from collections import Counter

n=int(eval(input()))

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

AC=Counter(A)

for i in range(n):

    if (i+1) in list(AC.keys()):

        print((AC[i+1]))

    else:

        print((0))
n=int(eval(input()))

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

L=[0]*n

for i in range(n-1):

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

for i in range(n):

    print((L[i]))
from collections import Counter

n = int(eval(input()))
A = list(map(int, input().split()))
AC = Counter(A)
for i in range(n):
    if (i + 1) in list(AC.keys()):
        print((AC[i + 1]))
    else:
        print((0))

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

-from collections import Counter - -AC = Counter(A) +L = [0] * n +for i in range(n - 1): +    L[A[i] - 1] += 1 -    if (i + 1) in list(AC.keys()): -        print((AC[i + 1])) -    else: -        print((0)) +    print((L[i]))