n = int(eval(input()))

 

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

 

employee_list = [0] * n

 

for boss in boss_list:

	employee_list[boss - 1] += 1

 

for employee in employee_list:

	print(employee)
N=int(eval(input()))

A=[int(n) for n in input().split()]

sub=[0]*N

for index in A:

    sub[index-1]+=1

print(("\n".join(map(str,sub))))
n = int(eval(input()))
boss_list = list(map(int, input().split()))
employee_list = [0] * n
for boss in boss_list:
    employee_list[boss - 1] += 1
for employee in employee_list:
    print(employee)

N = int(eval(input()))
A = [int(n) for n in input().split()]
sub = [0] * N
for index in A:
    sub[index - 1] += 1
print(("\n".join(map(str, sub))))

-n = int(eval(input())) -boss_list = list(map(int, input().split())) -employee_list = [0] * n -for boss in boss_list: -    employee_list[boss - 1] += 1 -for employee in employee_list: -    print(employee) +N = int(eval(input())) +A = [int(n) for n in input().split()] +sub = [0] * N +for index in A: +    sub[index - 1] += 1 +print(("\n".join(map(str, sub))))