N = int(eval(input()))

boss = {i+1: 0 for i in range(N)}

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



for i in A:

    boss[i] += 1



for i in range(N):

    print((boss[i+1]))
N = int(input())

boss = [0] * N

A = map(lambda x:int(x) - 1, input().split())



for i in A:

    boss[i] += 1



print(*boss, sep='\n')

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

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

-N = int(eval(input())) -boss = {i + 1: 0 for i in range(N)} -A = list(map(int, input().split())) +N = int(input()) +boss = [0] * N +A = map(lambda x: int(x) - 1, input().split()) -for i in range(N): -    print((boss[i + 1])) +print(*boss, sep="\n")