i1 = input() i2 = input().split() i3 = input().split() for i in i3: i2[int(i)-1] = str(int(i2[int(i)-1]) + 1) print(' '.join(i2))