peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())
A = list(map(int,input().split()))

Clist = []
for count in range(len(A)+1):
    Clist.append(0)

for count in range(len(A)):
    Clist[A[count]-1] = Clist[A[count]-1] + 1

for count in range(0,len(A)+1):
    print(Clist[count])
N = int(input())
A = list(map(int,input().split()))
l = [0]*N
for i in A:
  l[i-1] += 1
print(*l)
import collections
n = int(input())
a = list(map(int, input().split()))

c = collections.Counter(a)
for k in range(1,n+1):
    print(c[k])
import collections

n = int(input())
dic = collections.Counter(input().split())
for i in range(n):
  print(dic[str(i+1)])
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

n = ni()
a = nl()
l = [0]*n
for x in a:
    l[x-1] += 1
print(*l, sep='\n')
N=int(input())
A=list(map(int,input().split()))
P=[0]*N
for i in range(N-1):
    P[A[i]-1]+=1
for i in range(N):
    print(P[i])
N = int(input())
Alist = list(map(int, input().split()))
boss = {}
for i in Alist:
    if i not in boss:
        boss[i] = 1
    else:
        boss[i] += 1
for j in range(1,N+1):
    if j in boss:
        print(boss[j])
    else:
        print(0)
N = int(input())
A = list(map(int,input().split()))
dic = {i+1:0 for i in range(N)}
for i in range(N-1):
    dic[A[i]] =  dic[A[i]] +1

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

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

print(*A)
n = int(input())

a = [0]*n

a = [int(s) for s in input().split()]


dic = {}
for s in a:
    if not (s in dic):
        dic[s] = 1
    else:
        dic[s] += 1


for i in range(n):
    if not(i+1 in dic):
        print(0)
    else:
        print(dic[i+1])
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 numpy as np
n=int(input())
#n,m=list(map(int,input().split()))
a=list(map(int,input().split()))

ans=np.zeros(n)

for i in range(n-1):
	tmp= a[i] -1
	ans[tmp] += 1
    
for i in range(n):
	print(int(ans[i]))
n = int(input())

a = [int(x) for x in input().split()]

buka = [0]*n

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

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

B = [0] * (n + 1)
for a in A:
    B[a] += 1

for b in B[1:]:
    print(b)
N = int(input())
A = list(map(int, input().split()))

d = {x:0 for x in range(1, 1+N)}
for x in A:
    d[x] += 1
    
print('\n'.join(map(str,d.values())))
n = int(input())
A = list(map(int, input().split()))

s = [0]*(n+10)
for a in A:
    s[a-1] += 1

for i in range(n):
    print(s[i])
n = int(input())
dicti = {}
boss = list(map(int, input().split()))
for i in boss:
    if i in dicti:
        dicti[i] += 1
    else:
        dicti[i] = 1
#print(dicti)
for j in range(1,n+1):
    try:
        print(dicti[j])
    except:
        print(0)
from collections import Counter

N = int(input())

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

for i in range(1,N+1):
  print(A.get(i) if A.get(i) is not None else 0)
n = int(input())
input_line = list(map(int, input().split()))
data = [0 for i in range(n)]

for i in range(len(input_line)):
  data[input_line[i]-1] += 1

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

for i in B:
	print(i)
# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))


d = {}
for num in a:
    d[num] = d.get(num, 0) + 1


for i in range(1, len(a)+2):
    if i in d:
        print(d[i])
    else:
        print(0)
n=int(input())
a=list(map(int,input().split()))
l=[0 for i in range(n)]
for i in a:
  l[i-1]+=1

for i in l:
  print(i)
n=int(input())
buka = [0]*n
for joushi in input().split():
  buka[int(joushi)-1] += 1
print(*buka,sep='\n')
import sys
readline = sys.stdin.readline

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

ans = [0] * N

for i in range(len(A)):
  ans[A[i] - 1] += 1
  
for a in ans:
  print(a)
N=int(input())
A=[int(x) for x in input().rstrip().split()]
ans=[0 for i in range(N)]

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

for i in ans:
  print(i)
import collections

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

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 range(n-1):
    ans[a[i]-1] += 1

for v in ans:
    print(v)
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()))
answer = [0] * N

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

for n in answer:
  print(n)
N = int(input())
A = list(map(int, input().split()))

memo = {}
for i in range(N-1):
    Si = A[i]
    try:
        memo[Si] += 1
    except:
        memo[Si] = 1

for i in range(1, N+1):
    try:
        print(memo[i])
    except:
        print(0)
N = int(input())
A = [int(i) for i in input().split()]
buka = [0 for i in range(N)]
for a in A:
    buka[a-1] += 1
for n in range(N):
    print(buka[n])
社員数 = int(input())
部下数 = [0] * 社員数

for 上司 in map(int, input().split(' ')):
    部下数[上司-1] += 1

for 部下 in 部下数:
    print(部下)
n=int(input())
a=list(map(int,input().split(" ")))
countlist=[0 for i in range(n)]
for j in range(n-1):
  countlist[a[j]-1]+=1
for i in range(n):
	print(countlist[i])
n = int(input())
a = [0]
a.extend(list(map(int,input().split())))
nums = [0]*(n+1)
for i in a:
    nums[i] += 1

ans = '\n'.join(map(str,nums[1:]))
print(ans)
n=int(input())
a=list(map(int,input().split()))
rank=[0]*n
for i in a:
  rank[i-1]+=1
for i in rank:
  print(i)
N = int(input())
data = list(map(int,input().split()))
ans = [0] * N
for d in data:
    ans[d-1]+=1
for a in ans:
    print(a)
n = int(input())
a = list(map(int,input().split()))

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

for i in mem:
    print(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(N):
  print(J[i+1])
#
n = int(input())
P = [int(x)-1 for x in input().split()]
subs = [0]*n
for p in P:
    subs[p] += 1
print(*subs, sep='\n')
N = int(input())
A = list(map(int, input().split()))
dic = {i:0 for i in range(1, N+1)}
for i in range(N-1):
  dic[A[i]] += 1

for v in dic.values():
  print(v)
import collections
N = int(input())
A = list(map(int, input().split()))

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

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

for i in a_0:
    print(i)
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n = I()
    a = list(IL())
    m = [0]*n
    for rep in a:
        m[rep-1] += 1
    for rep in m:
        print(rep)
    return

if __name__=='__main__':
    Main()
N = int(input())
A = map(int, input().split())
res = [0] * N
for b in A:
    res[b - 1] += 1
for x in res:
    print(x)
i= int(input())
l=list(map(int, input().split()))
time=[]
for i in range(i):
  time.append([])
for i in l:
  
  time[i-1].append(i)
  
for i in time:

  print(len(i))
# coding: utf-8

num = int(input())

shain = input().split(" ")
kazu = []
for i in range(len(shain)):
    shain[i] = int(shain[i])
    
for i in range(num):
    kazu.append(0)
    
for j in range(len(shain)):
    kazu[shain[j] - 1] += 1
    
for k in range(num):
    print(kazu[k])
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in a:
  b[i-1]+=1
print(*b)
n=int(input(''))
a= [int(s) for s in input().split(" ")]
t=[0]*(n+1)
for i in range(0,len(a)):
        t[a[i]]+=1
for i in range(1,n+1):
    print(t[i])
N = int(input())
List = list(map(int,input().split()))
List2 = [0]*N
for i in range(N-1):
    List2[List[i-1]-1] += 1 
for j in List2:
    print(j)
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 = [int(i) for i in input().split()]

count = [0]*N
for elem in A:
    count[elem-1] += 1
for c in count:
    print(c)
import collections

n = int(input())
base = input().split()
x = []
for i in base:
    x.append(int(i))
#x.sort(reverse = False)
c = collections.Counter(x)
for i in range(1,n):
    print(c[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])
import collections

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

ans = [0] * n
for i in a:
    ans[i - 1] += 1
print("\n".join(map(str,(ans))))
import collections
n=int(input())
a=list(map(int,input().split()))
c=collections.Counter(a)
for x in range(1,n+1):
    print(c[x])
n = int(input())

a = [int(x)-1 for x in input().split()]

from collections import defaultdict

d = defaultdict(int)


for i in a:
  d[i] += 1

for i in range(n):
  print(d[i])
n=int(input())
l=list(map(int,input().split()))

ans=[0]*n

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

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

count = []
for i in range(len(A)+1):
    count.append(0)
for i in range(len(A)):
    count[A[i]-1] += 1

for i in count:
    print(i)
import math
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())
n = ii()
a = li()
b = [0]*(n+10)
for i in range(n-1):
    b[a[i]-1]+=1
for i in range(n):
    print(b[i])
R = int(input())
A = list(map(int,input().split()))

S = [ 0 for i in range(R) ]

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

for i in S :
  print(i)
n = int(input())
lst = [int(i) for i in input().split()]

ans = [0] * n
for i in range(n-1):
  number = lst[i]
  ans[number - 1] += 1

for i in ans:
  print(i)
N = int(input())
As  = list(map(int, input().split()))
from collections import defaultdict
d = defaultdict(int)
for a in As:
    d[a-1] +=1
for i in range(N):
    print(d[i])
import collections

N = int(input())
A = input().split()

c = collections.Counter(A)

for a in range(1, N+1):
    print(c[str(a)])
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

N = int(input())
A = list(map(lambda x: int(x)-1, input().split()))
dic = {}
for a in A:
    dic[a] = dic.get(a, 0)+1
for i in range(N):
    print(dic.get(i, 0))
n = int(input())
arr = [0] * n

for i in input().split():
    i = int(i)
    arr[i - 1] += 1

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

for i in range(len(a)):
    ans[a[i]]+=1
ans=ans[1:]
ansstr=''
for i in range(len(ans)):
    print(ans[i])
n = int(input())
ll = [0]*(n+1)
l = list(map(int,input().split()))
for i in l:
  ll[i]+=1
for i in range(n):
  print(ll[i+1])
from sys import stdin

N = int(stdin.readline().rstrip())

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

kazu = [0]*N

for i in range(N-1):
    kazu[As[i]-1] += 1


for i in range(N):
    print(kazu[i])
N = int(input())
Mgr = [int(num) for num in input().split()]
sub = [0]*N

for i in range(len(Mgr)):
    sub[Mgr[i]-1] += 1

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

from collections import Counter
ca = Counter(a)

for i in range(1, n+1):
    print(ca[i] if i in ca else 0)
N = int(input())
A = list(map(int, input().split()))
for i in range(N-1):
    A[i] -= 1
ans = [0 for i in range(N)]
for a in A:
    ans[a] += 1
for i in range(N):
    print(ans[i])
N = int(input())
*A, = map(int,input().split())
ans = [0]*N
for a in A:
    a -=1
    ans[a] += 1
for out in ans:
    print(out)
N=int(input())
A=[int(x) for x in input().split()]
R=[0 for _ in range(N)]
for i in range(N-1):
  j=A[i]-1
  R[j]=R[j]+1
for x in R:print(x)
n = int(input())
a = list(map(int, input().split()))

list =[0] * n

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


for i in range(n):
    print(list[i])
import collections
N=int(input())
L=list(map(int,input().split()))
for i in range(N):
	L.append(i+1)
S=collections.Counter(L)
S=sorted(S.items())
for x,y in S:
	print(y-1)
N=int(input())
A=list(map(int,input().split()))
anlist=[0]*N
for i in A:
  anlist[i-1]+=1
for i in anlist:
  print(i)
from collections import defaultdict
d = defaultdict(int)
N = int(input())
A = list(map(int, input().split()))

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

for i in range(1,N+1):
    print(d[i])
import collections

N=int(input())
X=list(map(int, input().split()))
c = collections.Counter(X)

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

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

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

num_buf = [0] * n

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

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

buka = [0] * N
for i in A:
    buka[i-1] += 1

for j in range(N):
    print(buka[j])
n=int(input())
l=list(map(int,input().split()))
k = [0]*n
for i in range(len(l)):
    c = l[i]
    k[c-1] = k[c-1]+1
for j in range(len(k)):
    print(k[j])
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in a:
    ans[i]+=1
for i in ans[1:]:
    print(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])
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
cnt = Counter(A)
for i in range(N):
    print(cnt[i+1])
n = int(input())
a = list(map(int, input().split()))

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

print(*num)
import collections
N = int(input())
A = list(map(int, input().split()))
count = collections.Counter(A)

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

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

print('\n'.join(map(str, x)))
n = int(input())
al = map(lambda x: int(x) - 1, input().split())
a = []
count = 0
for _ in [0] * n:
    a.append(0)
for x in al:
    a[x] += 1
    count += 1
for x in a:
    print(x)
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])
def main():
    n = int(input())
    a = list(map(int, input().split()))

    ans = []
    for i in range(n):
        ans.append(0)
    for x in a:
        ans[x-1] += 1

    for x in ans:
        print(x)

if __name__ == '__main__':
    main()
import numpy as np

def calculate_num_boss(num_person, boss):
    boss_count = np.zeros([num_person])
    result, num = np.unique(boss, return_counts=True)
    for idx in range(result.shape[0]):
        ids = result[idx]
        boss_count[ids-1] = num[idx]

    return boss_count


if __name__ == "__main__":
    num_person = int(input().split()[0])
    bosses = np.array([int(i) for i in input().split()])
    count = calculate_num_boss(num_person, bosses)
    for i in count:
        print(int(i))
n=int(input())
#list from 2 to n
alist=list(map(int,input().split()))

jodic={}

for i in alist:
    if i in jodic:
        jodic[i]=jodic[i]+1
    else:
        jodic[i]=1

for j in range(n):
    if j+1 in jodic:
        print(jodic[j+1])
    else:
        print("0")
import collections

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

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

Ans = [0] * N

for x in range(N-1):
    Ans[A[x]-1] += 1

for x in range(N):
    print(Ans[x])
N = int(input())
A = list(map(int, input().split()))
l = []
for i in range(N):
    l.append(0)
for x in A:
    l[x-1] += 1
for s in l:
    print(s)
from collections import Counter
n = int(input())
ls = list(map(int,input().strip().split()))
dic = Counter(ls)
for i in range(1,n+1):
    print(dic[i])
N=int(input())
A=list(map(int, input().split()))

x = [0]*N

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

for i in x:
    print(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)
N = int(input())
A = list(map(int, input().split()))
B = [0] * N #部下の人数

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

for b in B:
    print(b)
N = int(input())
A = list(map(int, input().split()))

count = 0
buka = [0 for _ in range(N)]

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

for k in range(N):
    print(buka[k])
from collections import Counter


def main():
    n = int(input())
    A = [int(e) for e in input().split()]

    D = Counter(A)
    for i in range(1, n + 1):
        print(D[i])


if __name__ == '__main__':
    main()
n = int(input())
a_i = list(map(int, input().split()))
ans_list = [0] * n
for i in a_i:
  ans_list[i - 1] += 1
for i in ans_list:
  print(i)
members_count = int(input())

belong_map = {}

belongings = [int(x) for x in input().split(' ')]

for b in belongings:
    if b - 1 in belong_map:
        belong_map[b - 1] += 1
    else:
        belong_map[b - 1] = 1

for i in range(members_count):
    if i in belong_map:
        print(belong_map[i])
    else:
        print(0)
#abc163c
n=int(input())
a=list(map(int,input().split()))
res=[0]*n
for x in a:
 res[x-1]+=1
for i in res:
 print(i)
N = int(input())
A = [int(_) for _ in input().split()]
cnt = [0 for i in range(N+1)]
for a in A:
    cnt[a] += 1
for c in cnt[1:]:
    print(c)
n=int(input())
d={i:0 for i in range(1,n+1)}
l=list(map(int,input().split()))
for i in range(1,n):
	d[l[i-1]]+=1
for i in d:
	print(d[i])
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
N = int(input())
A = [int(x) for x in input().split()]
cnt = [0] * N
for i in range(N-1):
    cnt[A[i]-1] += 1
for i in range(N):
    print(cnt[i])
n = int(input())

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

diff = [0] * n

for i in li:
    diff[i - 1] += 1

for j in diff:
    print(j)
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):
  print(B[i])
N = int(input())
num = {}

for i in range(N):
    num[i] = 0

A = list(map(int, input().split(" ")))
for i in range(len(A)):
    num[A[i]-1] += 1

[print(num[i]) for i in range(N)]
n = int(input())
a = [0]
a += list(map(int,input().split()))
b = [0]*n
for i in range(n-1,0,-1):
    b[a[i]-1] += 1
for i in b:
    print(i)
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):
    print(B[i])
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])
import collections

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A = collections.Counter(A)
    for i in range(1,N+1):
        print(A[i] if A[i] is not None else 0)

if __name__ == '__main__':
    main()
from collections import Counter
N = int(input())
d = Counter(map(int, input().split()))
for i in range(1, N+1):
    print(d[i])
import collections
n = int(input())
a = list(map(int,input().split()))
c = collections.Counter(a)
for i in range(1,n+1):
    print(c[i])
n = int(input())
an = list(map(int, input().split()))

an_map = [0] * n
for ai in an:
    an_map[ai - 1] += 1
for ai_map in an_map:
    print(ai_map)
n = int(input())
a = list(map(int, input().split()))
subordinates = [0 for i in range(n)]
for e in a:
    subordinates[e-1] += 1
for e in subordinates:
    print(e)
def main():

    num = int(input())
    boss = input().split()

    ans_list = [0] * num
    
    for i_boss in boss:
        #print(f'start for {i_boss}')
        ans_list[int(i_boss)-1] += 1
    a = list(map(lambda  x: str(x), ans_list))
    print('\n'.join(a))


if __name__ == '__main__':
    main()
# cook your dish here
n=int(input())
arr=list(map(int,input().split()))
blank=[0]*n
for i in range(len(arr)):
    blank[arr[i]-1]+=1
for i in blank:
    print(i)
import collections

n=int(input())
l=list(map(int,input().split()))
c=collections.Counter(l)
for i in range(1,n+1):
    print(c[i])
n=int(input())
l=list(map(int,input().split()))
a=[]
for i in range(n):
  a.append(0)
for i in range(n-1):
  a[l[i]-1]+=1
for i in range(n):
  print(a[i])
N = int(input())
A_i = list(map(int,input().split()))
cnt = [0]*N

for i in range(N-1):
    cnt[A_i[i]-1]+=1

for i in range(N):
    print(cnt[i])
import collections

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

c = collections.Counter(A)

i=1

for j in range(N):
  print(c[i])
  i+=1
def main():
        N = int(input())
        A = list(map(int, input().split()))

        l = [0]*N

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

        ans = "\n".join([str(x) for x in l])
        print(ans)

if __name__=="__main__":
        main()
import collections

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

c = collections.Counter(a)

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

ans = {i: 0 for i in range(n)}

for i in range(n-1):
    ans[A[i]-1] += 1
for k, v in ans.items():
    print(v)
import collections
N = int(input())
A = list(map(int,input().split()))

c = collections.Counter(A)
for i in range(1,N+1):
    print(c[i])
N = int(input())
A =[int(n) for n in input().split()]
b = [0]*N
for i in A:
  b[i-1]+=1
for i in range(N):
  print(b[i])
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
#from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [LI()for i in range(n)]
#inf = 10**17
#mod = 10**9 + 7
#s=input().rstrip()
    
n=I()
A=LI()
ans=[0]*n
for a in A:
    ans[a-1]+=1
for answer in ans:
    print(answer)
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])