N, M = input().split()
ls = [int(i)  for i in input().split()]
indls = [int(i) for i in input().split()]
for i in indls:
    ls[int(i)-1] += 1
ls = [str(i) for i in ls]
print(" ".join(ls))