n,m= input().split() n=int(n) m=int(m) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] for i in b: a[i-1]+=1 print (*a)