N = int(eval(input()))

ans = {i + 1: 0 for i in range(N)}

for a in list(map(int, input().split())):

    ans[a] += 1



for i in range(N):

    print((ans[i + 1]))

N = int(eval(input()))

ans = [0] * N

for a in list(map(int, input().split())):

    ans[a - 1] += 1

for a in ans:

    print(a)

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

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

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