N = int(eval(input()))

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



ans = [0] * N



for a in A:

    ans[a-1] += 1



for _ in ans:

    print(_)

N = int(eval(input()))

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



ans = [0] * N



for a in A:

    ans[a-1] += 1



print(('\n'.join(map(str, ans))))

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

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

-for _ in ans: -    print(_) +print(("\n".join(map(str, ans))))