N = int(eval(input()))

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



memo = {}

for i in range(N-1):

    Si = A[i]

    try:

        memo[Si] += 1

    except:

        memo[Si] = 1



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

    try:

        print((memo[i]))

    except:

        print((0))

N = int(eval(input()))

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

memo = {key:0 for key in range(1, N+1)}



for a in A:

    memo[a] += 1



for key in list(memo.keys()):

    print((memo[key]))

N = int(eval(input()))
A = list(map(int, input().split()))
memo = {}
for i in range(N - 1):
    Si = A[i]
    try:
        memo[Si] += 1
    except:
        memo[Si] = 1
for i in range(1, N + 1):
    try:
        print((memo[i]))
    except:
        print((0))

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

-memo = {} -for i in range(N - 1): -    Si = A[i] -    try: -        memo[Si] += 1 -    except: -        memo[Si] = 1 -for i in range(1, N + 1): -    try: -        print((memo[i])) -    except: -        print((0)) +memo = {key: 0 for key in range(1, N + 1)} +for a in A: +    memo[a] += 1 +for key in list(memo.keys()): +    print((memo[key]))