N,_,*L=map(int,open(0).read().split())

A=[0]*N

for l in L: A[l-1]+=1

print(*A,sep='\n')

N,_,*L=list(map(int,open(0).read().split()))

for n in range(N):print((L.count(n+1)))
N, _, *L = map(int, open(0).read().split())
A = [0] * N
for l in L:
    A[l - 1] += 1
print(*A, sep="\n")

N, _, *L = list(map(int, open(0).read().split()))
for n in range(N):
    print((L.count(n + 1)))

-N, _, *L = map(int, open(0).read().split()) -A = [0] * N -for l in L: -    A[l - 1] += 1 -print(*A, sep="\n") +N, _, *L = list(map(int, open(0).read().split())) +for n in range(N): +    print((L.count(n + 1)))