# input

n = int(eval(input()))

inp_ls = input().split(" ")

a_ls = [int(e) for e in inp_ls[:n-1]]



# calc

w_ls = {i+1: 0 for i in range(n)}

for a in a_ls:

	w_ls[a] += 1



# result

for i in range(n):

	print((w_ls[i+1]))
# input

n = int(eval(input()))

inp_ls = input().split(" ")

a_ls = [int(e) for e in inp_ls[:n-1]]



# calc

w_ls = [0 for i in range(n)]

for a in a_ls:

	w_ls[a-1] += 1



# result

for w in w_ls:

	print(w)
# input
n = int(eval(input()))
inp_ls = input().split(" ")
a_ls = [int(e) for e in inp_ls[: n - 1]]
# calc
w_ls = {i + 1: 0 for i in range(n)}
for a in a_ls:
    w_ls[a] += 1
# result
for i in range(n):
    print((w_ls[i + 1]))

# input
n = int(eval(input()))
inp_ls = input().split(" ")
a_ls = [int(e) for e in inp_ls[: n - 1]]
# calc
w_ls = [0 for i in range(n)]
for a in a_ls:
    w_ls[a - 1] += 1
# result
for w in w_ls:
    print(w)

-w_ls = {i + 1: 0 for i in range(n)} +w_ls = [0 for i in range(n)] -    w_ls[a] += 1 +    w_ls[a - 1] += 1 -for i in range(n): -    print((w_ls[i + 1])) +for w in w_ls: +    print(w)