N = int(eval(input()))

A = list(map(int, input().split()))



keys = [0]*N

for i in range(N):

    keys[i] = i+1





num = {key:0 for key in keys}

for i in A:

    num[i] += 1



for i in range(N):

    print((num[i+1]))
N = int(eval(input()))

A = list(map(int, input().split()))



ans = [0]*N

for a in A:

    ans[a-1] += 1



for i in ans:

    print(i)
N = int(eval(input()))
A = list(map(int, input().split()))
keys = [0] * N
for i in range(N):
    keys[i] = i + 1
num = {key: 0 for key in keys}
for i in A:
    num[i] += 1
for i in range(N):
    print((num[i + 1]))

N = int(eval(input()))
A = list(map(int, input().split()))
ans = [0] * N
for a in A:
    ans[a - 1] += 1
for i in ans:
    print(i)

-keys = [0] * N -for i in range(N): -    keys[i] = i + 1 -num = {key: 0 for key in keys} -for i in A: -    num[i] += 1 -for i in range(N): -    print((num[i + 1])) +ans = [0] * N +for a in A: +    ans[a - 1] += 1 +for i in ans: +    print(i)