N, M = map(int, input().split())
L1 = [int(i) for i in input().split()]
L2 = [int(j) for j in input().split()]
for i in L2:
    L1[i-1] += 1
print(*L1)