import collections

N = int(eval(input()))

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

number = collections.Counter(number)

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

    if i in number:

        print((number[i]))

    else:

        print("0")

N = int(eval(input()))

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

ans = [0]*N

for i in number:

    ans[i-1] += 1

for i in ans:

    print(i)



import collections

N = int(eval(input()))
number = list(map(int, input().split()))
number = collections.Counter(number)
for i in range(1, N + 1):
    if i in number:
        print((number[i]))
    else:
        print("0")

N = int(eval(input()))
number = list(map(int, input().split()))
ans = [0] * N
for i in number:
    ans[i - 1] += 1
for i in ans:
    print(i)

-import collections - -number = collections.Counter(number) -for i in range(1, N + 1): -    if i in number: -        print((number[i])) -    else: -        print("0") +ans = [0] * N +for i in number: +    ans[i - 1] += 1 +for i in ans: +    print(i)