peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())
A = list(map(int, input().split()))
results = [0] * N

for i in A:
    results[i - 1] += 1

print("\n".join(map(str, results)))
n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(n)]
for e in a:
  b[e-1] += 1
for e in b:
  print(e)
import numpy as np

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

rtn = np.zeros(n, dtype=int)
for i in a:
    rtn[i-1] += 1

for x in rtn:
    print(x)
import os
 
def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0] * n
        for i in a_list:
            result[i-1] += 1
        for i in result:
                print(i)
 
if __name__ == "__main__":
        main()
a=[0]*int(input())
for i in input().split():a[int(i)-1]+=1
print(*a)
n = int(input())
a = map(int, input().split())
subnums = [0]*n
for ai in a:
    subnums[ai - 1] += 1
for subnum in subnums:
    print(subnum)
n = int(input())
a = list(map(int, input().split()))

ct_a=[]
for i in range(n):
    ct_a.append(0)

for i in a:
    ct_a[i-1] += 1

for i in ct_a:
    print(i)
a=int(input())
b=[0]*a
c=list(map(int,input().split()))
for i in c:
    b[i-1]+=1
print(*b,sep="\n")
n = int(input())
a = [-1, -1] + list(map(int, input().split()))
cnt = [0] * (n+1)

for i in range(2, n+1):
    cnt[a[i]] += 1

for i in range(1, n+1):
    print(cnt[i])
import numpy as np

def main():
    args = input().rstrip().split(' ')
    N = int(args[0])
    args = input().rstrip().split(' ')
    A = np.array([int(val) for val in args])
    sup = np.zeros(N-1, dtype=np.int)
    
    for a in A:
        sup[a-1] += 1
    for val in sup:
        print(val)
    print(0)
    
if __name__ == "__main__":
    main()
from sys import stdin
import sys
import math

N = int(input())
A = list(map(int, stdin.readline().rstrip().split()))

h = {}

for i in range(1, N+1):
    h[i] = 0


for j in range(N-1):
    h[A[j]] += 1


for val in h.values():
    print(val)
N = int(input())
A = list(map(int, input().split()))
l = []
for n in range(N):
    l.append(0)

for e in A:
    l[e-1] += 1

for result in l:
    print(result)
n = int(input())
a = list(map(int, input().split()))
a = list(map(lambda x: x - 1, a))

cnts = [0 for _ in range(n)]
for ai in a:
    cnts[ai] += 1

for cnt in cnts:
    print(cnt)
a=input()
b=input()

N=int(a)
An=b.split(' ')

import numpy as np
C=np.zeros(N+1)
for ai1 in An:
    C[int(ai1)] += 1

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

ans = [0]*(n+1)

for i in range(n-1):
  ans[a[i]] += 1
  
for i in range(1, n+1):
  print(ans[i])
# -*- coding: utf-8 -*-

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

bosses = [0] * N
for a in A:
    bosses[a - 1] += 1

print(*bosses, sep='\n')
#import numpy as np
#import math
#from decimal import *
#from numba import njit

#@njit
def main():
    N = int(input())
    A = list(map(int, input().split()))

    C = [0]*N
    for a in A:
        C[a-1] += 1

    for c in C:
        print(c)

main()
n=int(input())
member=list(map(int,input().split()))
a=[0]*n
for i in member:
    a[i-1]+=1
for i in a:
    print(i)
from collections import Counter
n =int(input())
a = list(map(int, input().split()))
s = Counter(a)
ans = [0] * n
for k, v in s.items():
    ans[k - 1] = v
for i in ans:
    print(i)
import numpy as np

N = int(input())
A = np.array(input().split()).astype(int)

# res = np.sum(A == np.arange(1,N+1).reshape(N,1), axis= 1)
res = np.zeros(N).astype(int)
for i in range(N-1):
    res[A[i]-1] += 1
for i in range(N):
    print(res[i])
N=int(input())
A=[0]+list(map(int,input().split()))
call=[0 for i in range(N+1)]
for i in range(1,N):
    call[A[i]]+=1
for i in range(1,len(call)):
    print(call[i])
#print(*call[1:])
N = int(input())
A = list(map(int,input().split()))
buka = [0]*N
for a in A:
    buka[a-1] += 1
for b in buka:
    print(b)
import collections

N = int(input())
A = input().split(sep=' ')
A_list = []
for i in A:
    A_list.append(int(i))

c = collections.Counter(A_list)

for i in range(N+1):
    if i == 0:
        pass
    else:
        print(c[i])
n=int(input())

lst=list(map(int,input().split(' ')))

final=[0]*n

for i in lst:
    final[i-1]+=1
print(*final, sep='\n')
n = int(input())
li = list(map(int,input().split()))
ans_l=[0]*n

for i in li:
    ans_l[i-1] += 1
print(*ans_l,sep="\n")
N = int(input())
A = list(map(int,input().split()))

d = {}

for a in A :
    d.setdefault(a,0)
    d[a] += 1

# print(d)
for i in range(N) :
    if i+1 in d :
        print(d[i+1])
    else :
        print(0)
N = int(input())
A = list(map(int, input().split())) # <- note that this has (N - 1) elements
#print(A)
A_0 = [x - 1 for x in A]
#print(A_0)
ans = [0] * N # <- represents number of immediate subordinates of each person

for i in range(0, N - 1):
    ans[A_0[i]] += 1

for i in range(0, N):
    print(ans[i])
N = int(input())
A = list(map(int,input().split()))

B = [0]*N

for i in A:
	B[i-1] += 1
for j in range(len(B)):
	print(B[j])
import collections

N=int(input())
A=list(map(int,input().split()))
count=collections.Counter(A)

for i in range(N):
    print(count[i+1])
import collections
N = int(input())
A_list = list(map(int, input().split()))
c = collections.Counter(A_list)
for i in range(1, N + 1):
    print(c[i])
n=int(input())
a=list(map(int,input().split()))
ans=[[0] for _ in range(n)]
for i in range(n-1):
  ans[a[i]-1].append(i+2)
for s in ans:
  print(len(s)-1)
import collections

num_of_employee = int(input())
employeenos = list(map(int, input().split()))

c = collections.Counter(employeenos)
for i in range(1, num_of_employee + 1):
    print(c[i])
n = int(input())
out = [0] * n
l = map(int,input().split())
for v in l:
    out[v - 1] += 1
print('\n'.join(map(str,out)))
import collections

def MI(): return map(int, input().split())
def LI(): return list(MI())

if __name__ == "__main__":
    N = int(input())
    A = dict(collections.Counter(LI()))
    for i in range(1, N+1):
        count = A.get(i)
        print(count if count is not None else 0)
n = int(input())
a = list(map(int, input().split()))

ans = [0] * n
for i in a:
    ans[i-1] += 1

for i in range(n):
    print(ans[i])
def CountFrequency(my_list,n): 
  
    # Creating an empty dictionary  
    freq = {}
    for  i in range(1,n+1):
    	freq[i]=0

    for item in my_list: 
        if (item in freq): 
            freq[item] += 1
        else: 
            freq[item] = 1
  
    for key, value in freq.items(): 
        print (value)
  
# Driver function 
if __name__ == "__main__":  
    n=int(input())
    l=list(map(int,input().split())) 
  
    CountFrequency(l,n)
n = int(input())
arr = list(map(int,input().split()))

ans = [0 for i in range(n)]

for a in arr:
    ans[a-1] += 1

for i in range(n-1):
    print(ans[i])
print(ans[-1])
# -*- coding: utf-8 -*-
# C - management
# 標準入力の取得
N = int(input())
A = list(map(int, input().split()))

# 求解処理
result = [0 for n in range(N)]
for a in A:
    result[a-1] += 1

for r in result:
    print(r)
from collections import Counter

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

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

flg = [0 for i in range(n)]
for i in range(n):
    flg[a[i]] += 1
for i in range(n-1):
    print(flg[i+1])

print(0)
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n

for i in range(n - 1):
  j = a[i]
  ans[j - 1] += 1

print("\n".join( map( str, ans)))
N=int(input())
Acount=[0 for i in range(N)]
A=list(map(int,input().split()))
for i in range(N-1):
    Acount[A[i]-1]+=1
for i in range(N):
    print(Acount[i])
n = int(input())
A = list(map(int, input().split()))

ans = [0] * n

for a in A:
    a -= 1
    ans[a] += 1

print('\n'.join(map(str, ans)))
n = int(input())
l = list(map(int, input().split()))

ans = [0]*n

for i in l:
    ans[i-1] += 1

print("\n".join(map(str,ans)))
n = int(input())
numlist = list(map(int, input().split()))
# print(numlist)
result = [0] * n
# print(result)

for i in numlist:
	result[i - 1] = result[i - 1] + 1

for j in range(len(result)):
	print(result[j])
# for i in range(1, n + 1):
#	print(numlist.count(i))
import bisect
N = int(input())
A = [int(x) for x in input().split()]
A=sorted(A)
index = 0
for i in range(1, N+1):
    now = bisect.bisect_right(A, i)
    print(now - index)
    index = now
n = int(input())
a = map(int, input().split(" "))

j = [0] * n

for i in a:
  j[i - 1] += 1

for i in j:
  print(i)
N = int(input())
A = list(map(int, input().split()))
a=[0]*N

for i in range(N-1):
	a[A[i]-1]=a[A[i]-1]+1

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

n = int(input())
A = list(map(int, input().split()))
C = Counter(A)

for i in range(1, n + 1):
	print(C[i])
from collections import deque

n = int(input())
a = list(map(int,input().split()))
ans = [0] * n

for i in a:
    ans[i-1] += 1

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

for i in A:
    ans[i-1] += 1

for j in ans:
    print(j)
# a,b=map(int,input().split())
n=int(input())
ans=[0]*n
lst=list(map(int,input().split()))
for i in lst:
	ans[i-1]+=1
# print(ans)
for j in range(n):
	print(ans[j])
n = int(input())
buka = [0] * n
joshi = list(map(int, input().split()))
for i in range(len(joshi)):
  buka[joshi[i] - 1] += 1
for i in range(len(buka)):
  print(buka[i])
N = int(input())
A = list(map(int, input().split()))
S = [0] * N 
for i in A:
        S[i - 1] += 1
for i in range(N):
        print(S[i])
n = int(input())
ass = list(map(int, input().split()))

nl = [0 for _ in range(n)]
for e in ass:
  nl[e-1] += 1

for e in nl:
  print(int(e))
num = int(input())
a = list(map(int, input().split()))
count = [0] * num

for i in range(len(a)):
    count[a[i] - 1] += 1

for i in range(len(count)):
    print(count[i])
import collections
n = int(input())
a = [int(i) for i in input().split()]
cnt = collections.Counter(a)

for i in range(1, n+1):
    print(cnt[i])
N = int(input())

employees = list(map(int, input().split(" ")))

subordinates = [0] * N

for employee in employees:
    subordinates[employee-1] += 1
    
for i in range(N):
    print(subordinates[i])
N = int(input())
l = [int(x) for x in input().split()]
ans = [0] * N
for i in range(N-1):
  ans[l[i]-1] += 1
for i in range(N):
  print(ans[i])
from collections import defaultdict
n = int(input())
a = list(map(int, input().split()))
d = defaultdict(int)
for i in a:
    d[i] += 1
for j in range(1, n+1):
    print(d.get(j, 0))
def main():
  a = int(input())
  b =[0]*a
  
  for c in map(int, input().split()):
    b[c-1] += 1
    
  print('\n'.join(map(str, b)))

main()
n = int(input())
a = list(map(int, input().split()))
submap = {}
for each in a:
  try:
    submap[each] += 1
  except:
    submap[each] = 1
for i in range(1, n+1):
  try:
    print(submap[i])
  except:
    print(0)
n=int(input())
a=list(map(int,input().split()))
ans=[0]*(n+1)
for i in a:
    ans[i]+=1
for i in range(n):
    print(ans[i+1])
N=int(input())
n=[0]*N
for i in input().split():
    n[int(i)-1]+=1
print(*n)
n=int(input())
nums=list(map(int,input().split()))
l=[0]*n
for i in nums:
    l[i-1]+=1
for a in l:
    print(a)
from collections import Counter

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

c = Counter(a)
for i in range(1,n+1):
  print(c[i])
import collections
N = int(input())
A = [int(_) for _ in input().split()]
cnt = collections.defaultdict(int)
for a in A:
    cnt[a] += 1
for i in range(1, N + 1):
    print(cnt[i])
N=int(input())
A = list(map(int,input().split()))
buka=[0]*N
for i in A:
    buka[i-1]+=1
for m in buka:
    print(m)
N = int(input())
emp = list(map(lambda x:int(x) - 1, input().split()))
ans = [0] * N

for e in emp:
    ans[e] += 1

for i in ans:
    print(i)
N = int(input())
A = list(map(int, input().split()))
B = [0]*N
for i in A:
  B[i-1] += 1
for j in range(N):
  print(B[j])
n = int(input())
ans = [0] * n
for x in map(int, input().split()):
  ans[x-1] += 1

for x in ans:
  print(x)
N = int(input())
A = list(map(int, input().split()))
b = [0] * (N+1)

for i, a in enumerate(A):
    b[a] += 1

for i in b[1:]:
    print(i)
N = int(input())
cc = list(map(int,input().split()))
num = [0]*N
for i in cc:
  num[i-1] += 1
for i in num:
  print(i)
N = int(input())
Alist = list(map(int,input().split()))#iの上司

result = [0]*N

for i in range(N-1):#最後の社員に部下いない
    result[Alist[i]-1] +=1#上司の順番の要素に+1

for i in range(N):
    print(result[i])
import collections
N = int(input())
A = list(map(int, input().split()))
count = collections.Counter(A)
for n in range(N):
  print(count[n+1])
def abc163c_management():
    n = int(input())
    a = list(map(int, input().split()))
    cnts = [0] * n
    for v in a:
        cnts[v-1] += 1
    for v in cnts:
        print(v)
abc163c_management()
import collections
N = int(input())
A = list(map(int, input().split()))
B = collections.Counter(A)
for i in range(1,N):
   print(B[i])
print('0')
N = int(input())
A = list(map(int,input().split()))
ans = [0] * N
for i in range(N-1):
    ans[A[i] - 1] += 1
for i in range(N):
    print(ans[i])
n = int(input())
a = list(map(int, input().split()))
d = {}


for i in range(n):
    d[i] = 0
for i in a:
    d[i - 1] += 1

for i in range(n):
    print(d[i])
N = int(input())
A = list(map(int, input().split()))
buka = [0] * N
for i in A:
    buka[i - 1] += 1
for i in buka:
    print(i)
def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    ans=[0]*(n)
    for i in a:
        ans[i-1]+=1
    for i in ans:
        print(i)
resolve()
n = int(input())
a = [int(x) for x in input().split()]
m = {i : 0 for i in range(1, n+1)}

for i, x in enumerate(a):
  m[x] += 1

for x in range(1, n+1):
  print(m[x])
def main():
    n = int(input())
    a = [int(x) - 1 for x in input().split()]
    answer = {i: 0 for i in range(n)}
    for aa in a:
        answer[aa] += 1
    for i in range(n):
        print(answer[i])


if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))
d = {}
for i in a:
    if i not in d:
        d[i] = 1
    else:
        d[i] += 1
for j in range(1, n+1):
    if j in d:
        print(d[j])
    else:
        print(0)
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import pi
def main():
    n, *a = map(int, read().split())
    cnt = [0] * n
    for ae in a:
        cnt[ae-1] += 1
    print(*cnt, sep='\n')

if __name__ == '__main__':
    main()
n = int(input())
A = list(map(int, input().split()))

m = {}
for i in range(1, n+1):
    m[i] = 0
for a in A:
    m[a] += 1
for v in m.values():
    print(v)
n = int(input())
a = list(map(int,input().split()))
answer = [0] * n

for i in range(n - 1):
  answer[a[i] - 1] += 1
    
for i in range(n):
  print(answer[i])
N= int(input())
A = list(map(int, input().split()))

J = [0]*(N+1)
for i in range(N-1):
    J[A[i]] += 1

for i in range(1,N+1):
    print(J[i])
n=int(input())
a=list(map(int,input().split()))
boss=[0]*n
for i in a:
    boss[i-1]+=1
for i in boss:
    print(i)
import sys

n = int(input())
a = list(map(int, input().split()))
b = [0 for _ in range(n)]


asize = len(a)
for i in range(asize):
    b[a[i]-1] += 1

for i in range(n):
    print(b[i])
from collections import Counter
n = int(input())
A = Counter(list(map(int, input().split())))
ans = [0] * n
for x,y in A.items():
    ans[x-1] = y
for i in ans: print(i)
import sys
from collections import Counter
input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))
c = Counter(A)
k = set(A)
r = set(range(1, N + 1))

for key in r - k:
    c[key] = 0


for key in r:
    print(c[key])
n = int(input())
a = list(map(int, input().split()))

b = [0] * n

for i in a:
    b[i - 1] += 1

print(*b, sep="\n")
n = int(input())
a = list(map(int, input().split()))
cnt = [0] * n
for i in a:
    cnt[i - 1] += 1

for i in cnt:
    print(i)
c = [0]*int(input())
for x in input().split():
  c[int(x)-1]+=1
print('\n'.join(str(x) for x in c))
n=int(input())
a=input().split()
w=[0]*n
for i in a:
    w[int(i)-1]+=1
for i in w:
    print(i)
N = int(input())
A = list(map(int, input().split()))
ans = [0]*N
for i in range(N-1):
  ans[A[i]-1] += 1
for j in range(N):
  print(ans[j])
N=int(input())
A=list(map(int,input().split())) #N-1個
from collections import Counter
d=dict(Counter(A))

#print(d)

for i in range(1,N+1):
  if i in d:
    print(d[i])
  else:
    print(0)
import numpy as np
N = int(input())

A = list(map(int, input().split()))
         
c = [0 for i in range(N)]

for i in range(N-1):
    c[A[i] - 1] += 1

for i in range(N):
    print(c[i])
n = int(input())
a_list = list(map(int,input().split()))
ans_list = [0]*n
for i in a_list:
    ans_list[i-1] += 1
for j in range(n):
    print(ans_list[j])
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
n = int(input())
A = list(map(int, input().split()))
b = [0]*(n+1)
for i in A:
    b[i]+=1
for i in range(1, n+1):
    print(b[i])
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 # 998244353
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    counter = [0] * n
    for a in map(int,input().split()):
        counter[a - 1] += 1
    print(*counter, sep='\n')
resolve()
n = int(input())
a_list = list(map(int, input().split()))

l = [0] * n

for a in a_list:
    l[a - 1] += 1
for i in l:
    print(i)
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#ans = [0]*n
n = int(input())
a = list(map(int, input().split()))
ans = [0]*n

for i in a:
    ans[i-1] += 1

for j in ans:
    print(j)
from collections import defaultdict

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

buka = defaultdict(int)

for i in range(N-1):
    buka[A[i]-1] += 1

for i in range(N):
    print(buka[i])
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
d = Counter(a)


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

cnt = Counter(a)


print(cnt[1])
for i in range(2, n+1):
    print(cnt[i])
n=int(input())
#l=list(map(int,input().split()))  #inputした数値列をintにしてlistを作成 けどなぜか使えない
list = input().split(" ")
list_int = []
for i in list:
  list_int.append(int(i)) 
k = [0]*n                         #大きさnのリスト
for i in list_int:
  k[i-1] = k[i-1]+1
for j in range(n):
  print(k[j])
def main():
  N = int(input())
  A = [0] * N 
  for i in input().split():
    A[int(i)-1] += 1 
  for i in range(N):
    print(A[i])

if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int, input().split()))
li = [0]*N
for e in A:
  li[e-1] += 1
for i in range(N):
  print(li[i])
N = int(input())
A = list(map(int,input().split()))

ans_list = [0]*N
for n in range(N-1):
    ans_list[A[n]-1] +=1
for i in range(N):
    print(ans_list[i])
N = int(input())
a_list = list(map(int, input().split()))
count = [0] * N
for a in a_list:
    count[a-1] += 1
for c in count:
    print(c)
n = int(input())
a = list(map(int, input().split()))

b = []
for h in range(n):
    b.append(0)

for i in a:
    b[i-1] += 1

for j in b:
    print(j)
#!/usr/bin/env python3

from pprint import pprint
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.buffer.readline

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

ans = [0 for _ in range(n)]
for a_i in a:
    ans[a_i - 1] += 1

for i in range(n):
    print(ans[i])
N = int(input())

A = [int(i) for i in input().split()]

S = [0] * (N+1)

for i in A:
    S[i] += 1 

for s in S[1:]:
    print(s)
ppap = int(input())
a_list=list(map(int, input().split()))

b = [0]* ppap


for i in range(len(a_list)):
    b[a_list[i]-1]+=1

for i in range(ppap):
    print(b[i])
import sys


def resolve(in_, out):
    n = int(in_.readline())
    b = [0] * (n + 1)
    for a in map(int, in_.readline().split()):
        b[a] += 1
    out.write('\n'.join(map(str, b[1:])))


def main():
    resolve(sys.stdin.buffer, sys.stdout)


if __name__ == '__main__':
    main()
n = int(input())
a = [int(i) for i in input().split()]
ans = [0] * (n)
for i in a:
    ans[i-1] += 1
[print(i) for i in ans]
from collections import Counter

N = int(input())
C = Counter(map(int,input().split()))

for i in range(1,N+1):
    print(C[i])
# coding: utf-8
# Your code here!
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n-1):
 b[a[i]-1]+=1
for i in range(n):
 b[i]=str(b[i])
 print(b[i])
N = int(input())
A = list(map(int,input().split()))

sup = [0] * N

for i in range(len(A)):
    sup[A[i]-1] += 1

for i in range(len(sup)):
    print(sup[i])
N = int(input())
l = list(map(int, input().split()))

ans = [0] * N

for i in range(len(l)):
    ans[l[i] - 1] += 1

for i in ans:
    print(i)
import collections

N = input()
A =  [int(data) for data in input().split()]

c = collections.Counter(A)
for n in range(1, int(N)+1):
    print(c[n])
n = int(input())
a = list(map(int,input().split()))
ans = [0]*n

for i in a:
    ans[i-1] = ans[i-1] + 1

for i in ans:
    print(i)
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    ans = [0] * N
    for i in A:
        ans[i-1] += 1
    for i in ans:
        print(i)



if __name__ == '__main__':
    main()
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    A = list(map(lambda x: int(x) - 1, input().split()))
    S = [[] for _ in range(N)]
    for i in range(N - 1):
        S[A[i]].append(i + 2)

    for s in S:
        print(len(s))


if __name__ == "__main__":
    main()
n = int(input())
a = list(map(int, input().split()))

cnt = [0] * n
for i in range(n - 1):
    cnt[a[i] - 1] += 1

for i in cnt:
    print(i)
N=int(input())
A=list(map(int,input().split()))
B=[0]*N
for x in range(N-1):
  B[A[x]-1] += 1
for y in range(N):
  print(B[y])
N = int(input())
a = list(map(int, input().split()))

k = [0]*N

for i in a:
  k[i-1] += 1

for i in k:
  print(i)
from sys import stdin
import math
import fractions

n = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

count = [0] * n

for aa in a:
    count[aa-1] += 1


for c in count:
    print(c)
n = int(input())
A = list(map(int, input().split()))
T = [0]*n

for a in A:
    T[a-1] += 1

for t in T:
    print(t)
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    import collections
    c = collections.Counter(A)
    for i in range(1,N+1):
        print(c[i])
resolve()
n = int(input())
a = list(map(int, input().split()))
cnt = [0] * n
for i in a:
    cnt[i - 1] += 1
print(*cnt, sep = "\n")
# R = int(input()) 
N= int(input())
A = list(map(int, input().split()))



# if N >= sum(A):
#     print(N-sum(A))
# else:
#     print(-1)
count= [0] * N

for x in A:
    count[x-1] +=1
for i in range(N):
    print(count[i])

# def count_defaultdict(it):
#     counter = collections.defaultdict(int)
#     for x in it:
#         counter[x] += 1
#     return dict(counter)
n=int(input())
a=[int(x)for x in input().split()]
c=[0]*n
for e in a:c[e-1]+=1
for e in c:print(e)