from collections import Counter

n = int(eval(input()))

a = Counter(list(map(int, input().split())))



for i in range(n):

  print((a[i+1]))
n = int(eval(input()))

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



s = [0]*n

for i in a:

  s[i-1] += 1

  

for i in s:

  print(i)
from collections import Counter

n = int(eval(input()))
a = Counter(list(map(int, input().split())))
for i in range(n):
    print((a[i + 1]))

n = int(eval(input()))
a = list(map(int, input().split()))
s = [0] * n
for i in a:
    s[i - 1] += 1
for i in s:
    print(i)

-from collections import Counter - -a = Counter(list(map(int, input().split()))) -for i in range(n): -    print((a[i + 1])) +a = list(map(int, input().split())) +s = [0] * n +for i in a: +    s[i - 1] += 1 +for i in s: +    print(i)