n,_,*r=list(map(int,open(0).read().split()))

for i in range(n):print((r.count(-~i)))
n,_,*r=list(map(int,open(0).read().split()));print((*list(map(r.count,list(range(1,n+1))))))
n, _, *r = list(map(int, open(0).read().split()))
for i in range(n):
    print((r.count(-~i)))

n, _, *r = list(map(int, open(0).read().split()))
print((*list(map(r.count, list(range(1, n + 1))))))

-for i in range(n): -    print((r.count(-~i))) +print((*list(map(r.count, list(range(1, n + 1))))))