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]))
N = int(input())

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

l = [0]*N

for i in A:

  l[i-1] += 1

print(*l,sep="\n")

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]))

N = int(input())
A = list(map(int, input().split()))
l = [0] * N
for i in A:
    l[i - 1] += 1
print(*l, sep="\n")

-N = int(eval(input())) +N = int(input()) -for i in range(N - 1): -    l[A[i] - 1] += 1 -for i in range(N): -    print((l[i])) +for i in A: +    l[i - 1] += 1 +print(*l, sep="\n")