from collections import defaultdict

N = int(eval(input()))

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

d = defaultdict(int)

for i in A:

    d[i] += 1

for i in range(1,N+1):

    print((d[i]))
N = int(eval(input()))

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

ans = [0] * N

for i in range(N-1):

    ans[A[i] - 1] += 1

for i in range(N):

    print((ans[i]))
from collections import defaultdict

N = int(eval(input()))
A = list(map(int, input().split()))
d = defaultdict(int)
for i in A:
    d[i] += 1
for i in range(1, N + 1):
    print((d[i]))

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

-from collections import defaultdict - -d = defaultdict(int) -for i in A: -    d[i] += 1 -for i in range(1, N + 1): -    print((d[i])) +ans = [0] * N +for i in range(N - 1): +    ans[A[i] - 1] += 1 +for i in range(N): +    print((ans[i]))