import numpy as np

# Create an array of size 10, filled with ones
Z = np.ones(10)

# Create an array of 20 random integers between 0 and the length of Z
I = np.random.randint(0, len(Z), 20)

# Set n to 1
n = 1

# Loop through each element in I and increment the corresponding element in Z by n
for i in I:
    Z[i] += n

# Print the final array Z
print(Z)