from collections import Counter

N = int(eval(input()))

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

C = Counter(List)



for i in range(1,N):

  if i in list(C.keys()):

    print((C[i]))

  else:

    print((0))

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

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

cnt = [0] * (N+1)



for i in range(N-1):

    cnt[ls[i]] += 1

    

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

    print((cnt[i]))
from collections import Counter

N = int(eval(input()))
List = list(map(int, input().split()))
C = Counter(List)
for i in range(1, N):
    if i in list(C.keys()):
        print((C[i]))
    else:
        print((0))
print((0))

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

-from collections import Counter - -List = list(map(int, input().split())) -C = Counter(List) -for i in range(1, N): -    if i in list(C.keys()): -        print((C[i])) -    else: -        print((0)) -print((0)) +ls = list(map(int, input().split())) +cnt = [0] * (N + 1) +for i in range(N - 1): +    cnt[ls[i]] += 1 +for i in range(1, N + 1): +    print((cnt[i]))