from collections import Counter

N = int(eval(input()))

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

subordinates = [0] * N

boss_and_cnt = Counter(A)

for boss, cnt in list(boss_and_cnt.items()):

  subordinates[boss - 1] = cnt

for s in subordinates:

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

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

subordinate_cnt = [0] * N

for boss_num in A:

  subordinate_cnt[boss_num - 1] += 1

print(("\n".join(map(str, subordinate_cnt))))
from collections import Counter

N = int(eval(input()))
A = list(map(int, input().split()))
subordinates = [0] * N
boss_and_cnt = Counter(A)
for boss, cnt in list(boss_and_cnt.items()):
    subordinates[boss - 1] = cnt
for s in subordinates:
    print(s)

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

-from collections import Counter - -subordinates = [0] * N -boss_and_cnt = Counter(A) -for boss, cnt in list(boss_and_cnt.items()): -    subordinates[boss - 1] = cnt -for s in subordinates: -    print(s) +subordinate_cnt = [0] * N +for boss_num in A: +    subordinate_cnt[boss_num - 1] += 1 +print(("\n".join(map(str, subordinate_cnt))))