n, m = map(int, input().split())
List1 = [int(i) for i in input().split()]
List2 = [int(j) for j in input().split()]
for i in List2:
    List1[i-1] += 1
print(*List1)