peterverebics/CodeNet_Python_118 huggingface dataset:
import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
b = np.zeros(n)
for i in a: b[i-1] += 1
print(b)
import collections

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

c = collections.Counter(M)

#print(c)

for i in c.values():
    print(i)

for j in range(N-len(c)):
    print("0")
n=int(input())
ali = input().split()

j=1
t=[0]*n
for i in range(n-1):
    if j == int(ali[i]):
        t[j-1]+=1
    else:
        t[j]+=1
        j+=1
for i in range(n):
    print(t[i])
n = int(input())
a = [int(n) for n in input().split()]

b = [0] * n

for i in a:
    b[i-1] += 1
    print(b)
 
for i in b:
    print(i)
n = int(input())
a_list = list(map(int,input().split()))

inf_list = []
for i in range(1, n+1):
  inf_count = a_list.count(i)
  inf_list.append(inf_count)

print(inf_list)
import pprint
N = int(input())
A =list(map(int, input().split()))
B = [print(A.count(i+1)) for i in range(N)]
pprint.pprint(1)
N = int(input())
A = list(map(int, input().split()))
clist = []
for i in range(1,N):
  clist = clist + [A.count(i)]
for j in clist:
  print(j)
n = int(input())
a = list(map(int, input().split()))

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

for i in range(n):
    print(ans[i])
n = int(input())
array = list(map(int, input().strip().split()))
for i in range(1,n):
    print(array.count(i))
import sys
import os
import math

def file_input():
    f = open('input.txt', 'r')
    sys.stdin = f

def main():
   # file_input()

    N = [0]*int(input())
    A = list(map(int, input().split()))

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

    for i in N[1:]:
        print(i)


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

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

all = np.zeros(n+1)

for j in range(1,n+1):
    for i,a_i in enumerate(a):
        if j == a_i:
            all[a_i] += 1
for i in range(len(all)):
    if i >= 1:
        print(all[i])
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
d = Counter(a)
d = sorted(d.items(), key = lambda x : x[0])
f = len(d)
for i in range(len(d)):
  print(d[i][1])

for i in range(n - f):
  print(0)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
a = list(map(int, readline().split()))
l = [0]*n
for i in a:
    l[i - 1] += 1
print(l, sep="/n")
import collections

n = int(input())
List = list(map(int, input().split()))
Col = collections.Counter(List)
Col2 = sorted(Col.items())
CountList = []
for i in Col2:
    CountList.append(i[1])

for i in range(n-len(CountList)):
    CountList.append(0)

for i in CountList:
    print(i)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter


def main():
    N = int(input())
    A = list(map(int, input().split()))
    count = Counter(A).values()

    for i in count:
        print(i)
    for _ in range(N - len(count)):
        print(0)


if __name__ == "__main__":
    main()
n = int(input())
a = list(map(int,input().split()))
ans = [0] * n
ans[0] = a.count(1)

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

print(*ans,sep='\n')
N = int(input())
A = list(map(int,input().split()))
for i in range(1, N-1):
   print(A.count(i))
print(0)
n = int(input())
a_lst = list(map(int, input().split()))
res_lst = []

for i in range(n):
  cnt = (a_lst.count(i+1))
  res_lst.append(cnt)

print(res_lst)
import heapq
import bisect

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

heapq.heapify(a)
for i in range(n):
    l = bisect.bisect_right(a, i+1)
    r = bisect.bisect_left(a, i+1)
    print(l-r)
# coding: utf-8
# Your code here!
import numpy as np
from numba import njit

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

#NMAX = max(A)
@njit
def keisan(A,i):
    ans = A.count(i)
    print(ans)

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

for i in range(N):
    print(worker_list[i])
import collections
member = int(input())
subcount = list(map(int, input().split()))
count = dict(collections.Counter(subcount))
for i in sorted(count):
  print(count[i])
for i in range(member - len(count)):
  print(0)
x=int(input())
l=[int(i) for i in input().split()]
d={}
count=0
for i in l:
	if d.get(i) is not None:
		count+=1
		d[i]=count
	else:
		count=1
		d[i]=count

for i in range(1,x+1):
	if d.get(i) is not None:
		print(d[i])
	else:
		print("0")
N = int(input())
A = list(map(int,input().split()))
import collections
c = collections.Counter(A)
for i in range(N):
    if not i in c.keys():
        c[i] = 0
for i in c.values():
    print(i)
# import math
# import statistics
a=int(input())
#b,c=int(input()),int(input())
# c=[]
# for i in a:
#    c.append(i)
# e1,e2 = map(int,input().split())
f = list(map(int,input().split()))
#g = [input() for _ in range(a)]

f.sort()
count=1
ans=[0 for i in range(len(f))]

for i in range(len(f)-1):
    if f[i]==f[i+1]:
        count+=1
    else:
        ans[f[i]-1]=count
        count=1
if count>1:
    ans[f[-1]-1]=count
for i in ans:
    print(i)
N = int(input())
A = []
A = list(map(int, input().split()))




for i in range(N-1):
  cnt = 0
  for j in range(N-1):
    if A[j] == i+1:
      cnt += 1
  print(cnt)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter


def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    count = Counter(A).values()

    for i in count:
        print(i)
    for _ in range(N - len(count)):
        print(0)


if __name__ == "__main__":
    main()
N = int(input())
A = [int(i) for i in input().split(' ')]
B = [0] * N
for i in A:
	B[i] += 1

for i in B:
	print(i)
N = int(input()) 
sub = list(map(int,input().split())) 
number = list(range(1, N+1, 1)) 
print(number)
cnt = 0 
for i in range(int(len(number))):
    for j in range(int(len(sub))):
        if number[i] == sub[j]:
            cnt = cnt + 1
        
    print(cnt)
    cnt = 0
import collections
n=int(input())
c=list(map(int,input().split()))
k=n
u=n
c1 = collections.Counter(c)
if len(c1)==len(c):
    while k>1:
        k=k-1
        print(1)
    print(0)
else:
    for i in range(1,n):
        p=(c.count(i))
        print(p)
        k=k-p
        u=u-1
        if k<2:
            break
            while u>0:
                print(0)
                u=u-1
N = int(input())
A = list(input().split())
for i in range(1,N+1) :
    ans = A.count(i)
    print(ans)
N = input()
S = input()

for A in range (int(N)-1):
    print(S.count(str(A+1),A,int(N)-2))
print(0)
N=int(input())
A=input().split(" ")
for n in range(1,N):
    print(A.count(str(n)))
N = int(input()) 
A=list(map(int,input().split())) 
s=[]
for i in range(N):
    s.append(A.count(i+1))
    if A.count(i+1)>0:
        A.remove(i+1)
    if len(A)==0:
        for _ in range(i,N-1):
            print(0)
        break
import numpy as np
import collections

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

all = np.zeros(n+1)

c = collections.Counter(a)

for ans in c.values():
    print(ans)
o = len(c)

for i in range(n-o):
    print(0)
a = int(input())
lists = list(map(int, input().split())) #１行の入力をi[0],i[1]というように空白で分けてを取得し、iに値を入れる

num = [0]*a

def mi(x):
    return int(x-1)
y = list(map(mi,lists))
for i in y:
    #print(i)
    num[y[i]] += 1
for i in range(a):
    print(num[i])
n=int(input())
a=[int(x) for x in input().split()]
d={}
for i in range(n-1):
    if a[i] in d:d[a[i]]+=1
    else:d[a[i]]=1
c=[i for i in d.values()]
for i in range(len(c)):print(c[i])
for i in range(n-len(c)):print(0)
N=int(input())
A_r=list(input().split())
A=[int(x) for x in A_r]
B=[0 for i in range(N)]
print(B)
for i in range(len(A)):
    B[A[i]-1]+=1
[print(i) for i in B]
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])
people = int(input()) - 1
boss = input().split(' ')
boss = list(map(int,boss))
dict_boss = {}
for i in range(people):
	if boss[i]-1 not in dict_boss:
		dict_boss[boss[i]-1] = 1
	else:
		dict_boss[boss[i]-1] += 1
boss = [0] * people
for key in dict_boss:
	boss[key] = dict_boss[key]
for i in boss:
	print(i)
n = int(input())

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

for i in range(1, n + 1):
    ls2 = ls[i:]
    c = ls2.count(i)
    print(c)
N = int(input())
A_list = list(map(int, input().split()))
A_set = sorted(set(A_list))

A_output = [0 for i in range(N)]

for i in range(len(A_set)):
    A_output[A_set[i]-1] = A_list[A_set[i]:].count(A_set[i])
    
for i in range(len(A_output)):
    print(A_output[i])
N=int(input())
A=input().split()
for i in range(N-1):
    print(A.count([i]))
print("0")
import collections
N=int(input())
A=list(map(int,input().split()))
a=collections.Counter(A)
for i in range(1,N+1):
  print(a["i"])
N = int(input())
A = [int(a) for a in input().split()]

for ai in A:
    print([(a<ai) for a in A].count(True))
n = int(input())
a =list(map(int, input().split()))
l =[0] * (n+1)

for i in range(0,n-1):
    l[a[i]] +=1
    
for i in l[1:]:
    print(l[i])
N = int(input('')) #input()で入力を受け取ってint()で数字型に変換します。

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

A.insert(0,0)

A.insert(0,0)

subordinate = [0] * (N+1)
#subordinate[N-1] = 0

# print(subordinate)
# print(A)

for index in range(N, 1, -1):
    subordinate[A[index]] = subordinate[A[index]] + 1


for index in range(1, N, 1):
    print(subordinate[index])
N=int(input())

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

B=[0]*len(A)

for i in A:
  B[i-1]+=1
  
for i in B:
  print(i)
N = int(input())
A = list(map(int,input().split()))
for i in range(1,N+1):
  if A.count(i) > 0:
    print(A.count(i))
    A.remove(i)
N = input()
S = input()

for A in range (int(N)):
    print(S.count(str(A+1),A,int(N)-1))
N=int(input())
A = list(map(int, input().split()))
for n in range(N):
    print(A.count(str(n+2)))
n = int(input())
a = [int(i) for i in input().split()]
b = [len([i for i in a if i == j]) for j in range(n+1)]
print(b[1:])
N=int(input())
A=list(map(int, input().split()))
b=[0]*N
for i in A:
    b[i-1]+=1
for i in b:
    print(b)
N = input()
A = input().split()

for i in range(len(A)):
  print(A.count(str(i)))
n = int(input())
l = list(map(int,input().split()))

k = 0
j = 1
cnt = 0
for i in range(n):
    if i == n-1:

        print(cnt)
        for _ in range(n - j):
            print(0)
    elif j == l[i]:
        cnt += 1
    elif l[i] - j >= 1:
        print(cnt)
        cnt = 1
        a = l[i] - j
        for _ in range(a-1):
            print(0)
        j += l[i] -j
n = int(input())
boss = [0] + list(map(int, input().split()))
print(boss)
for i in range(n):
    print(boss.count(i+1))
from collections import Counter

n = int(input())
li = [int(x) for x in input().split()]
d = Counter(li)
count = 0
for i in d:
  print(d[i])
  count += 1
for i in range(n-count):
  print(0)
N= int(input())
Alist = [int(i) for i in input().split()] 

count = 0

for j in range(1, N+1):
  for i in range(j,N-1):
    if Alist[i] == j:
      count += 1
     
    if Alist[j] > j:
      break
  
  print(count)
  count = 0
N = int(input())
A = list(map(int,input().split()))
B = [0]*N
for i in range(N-1):
    B[A.pop()-1]+=1
for i in B:
    print(B[i])
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
for i in range(1,n+1):
    a.append(i)
a_counter = Counter(a)
for i in a_counter:
    print(a_counter[i]-1)
N = int(input())
A = list(map(int,input().split()))
A.sort()
a = [0]
for i in range(len(A)-1):
    if A[i] != A[i+1]:
        a.append(i+1)
a.append(N-1)
# print(a)

for i in range(N):
    if i >= len(a)-1:
        print(0)
    else:
        ans = a[i+1]-a[i]
        print(ans)
n = int(input())
A = input().split()
a = [int(i) for i in A]
b = [0]*n

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

for i in range(n):
    print(b[i])
n = int(input())
a = list(map(int, input().split(" ")))

cursor = 1
counter = 0

for i in range(0, n - 1):
    if a[i] == cursor:
        counter += 1
    elif a[i] > cursor:
        print(counter)
        for j in range(cursor + 1, a[i] - 1):
            print(0)
        cursor = a[i]
        counter = 1

print(counter)
for i in range(cursor + 1, n + 1):
    print(0)
n = int(input())
a = [int(n) for n in input().split()]

boss = 1
li = []

k = 0
for i in a:
    if i == boss:
        k += 1
li.append(k)
del(k)

for i in a:
    k = 0
    for j in a:
        if j > i:
            k += 1
    li.append(k)

for sth in li:
    print(sth)
n = int(input())
a = list(input().split())
#print(a)

employ = {}

for i in range(len(a)):
    if a[i] in employ:
        employ[a[i]] = employ[a[i]] + 1
    else:
        employ[a[i]] = 1

#print(employ)
for i in range(1, n):
    if str(i) in employ:
        print(employ[str(i)])
    else:
        print(0)
import numpy as np
import math as mt
N=int(input())
#R=map(int, input().split())
A=list(map(int,input().split()))
count=1
for i in range(0,N-1):
    if i==N-2:
        print(count)
        print(0)
    elif A[i]!=A[i+1]:
        print(count)
    else:
        count=count+1
N = int(input())
A = list(map(int, input().split()))

for i in range(1,len(A)+1):
    print(A.count(i))
from collections import deque as dq

n = int(input())
a = dq(int(i) for i in input().split())

for i in range(1, n + 1):
    cnt = 0
    while a:
        if a[0] == i:
            cnt += 1
            a.popleft()
        else:
            break
    print(cnt)
n = int(input())
a_list = map(int, input().split())
nl = [0] * n
for a in a_list:
    nl[a] += 1
for v in nl:
    print("{}".format(v))
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read
 

N = int(input())

A = list(map(int, input().split()))  # n個の文字列がリストに格納される

for i in range(N-1):
    print(A.count(i+1))
    while i+1 in A:
        A.remove(i+1)
    if A == []:
        break

print('0')
N = int(input())
A = list(map(int,input().split()))
m = [0]*N #0~N-1
print(m)
for i in A:
    m[i-1] += 1
for i in range(N):
    print(m[i])
N =int(input())
A =list(map(int,input().split()))
l =[0]*N
for i in A:
  l[i-1]+=1
print(l)
N = int(input())
A = list(map(int,input().split()))
l = [0]*N
for i in A:
    l[i-1] +=1
print(x for x in l)
N = int(input())
A = list(map(int,input().split()))

for i in range(1,N):
    print(sum(x == i for x in A))
num = int(input())
a = input().split()

s_a = set(a)

dc = {}

for i in s_a:
  dc[int(i)] = a.count(i)
  
index = 1
k = 0
for i in dc.keys():
  print('0\n'*(index - i), end='')
  print(dc[i])
  index += 1
 
print('0\n' * (num-(index-1)), end='')
import numpy as np
from collections import defaultdict
from math import gcd
import time
import sys
from collections import Counter
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


start = time.time()
N = int(input())
A = input().split(' ')
c = Counter(A)
print(c)
for i in range(1, N+1):
    if str(i) in c:
        print(c[str(i)])
    else:
        print(0)
N = int(input())
a = list(map(int,input().split()))
buka_num=[0 for _ in range(N+1)]

for i in a:
  buka_num[i]+=1
buka_num.pop(0)
buka_num.append(0)
for j in buka_num:
  print(j)
num = int(input())
a = input().split()

l_a = [int(x) for x in a]
s_a = set(l_a)

dc = {}

l_s = []
for i in s_a:
  dc[i] = l_a.count(i)
  
index = 1
k = 0
for i in dc.keys():
  while i + k < index:
    print(0)
    k += 1
  print(dc[i])
  index += 1
  
while index <= num:
  print(0)
  index += 1
N=int(input())
A=input().split()
for i in range(N-1):
    print(A.count(A[i]))
    print("0")
N=int(input())
li=list(map(int,input().split()))
p=0
for i in "(N-1)":
  p+=1
  print(li.count(p))
n = int(input())
a = list(map(int,input().split()))

a.sort()
a.append(0)

number = 1
count = 0

for i in range(n):
    if number == a[i]:
        count += 1
    elif a[i] == number + 1:
        print(count)
        count = 1
    else:
        for j in range(n):
            print(count)
            count = 0
            number += 1
            if number == a[i]:
                break
N = int(input())

Ninzu = []
for x in input().split():
	Ninzu.append(int(x))

i = 1
for i in range(1,N):
	print(Ninzu.count(i))
n = int(input())
a = set([ int(x) for x in input().split() ])

for i in range(n-1):
    print(len(list(a & set([i+1]))))

print(0)
from collections import deque
n = int(input())
de = deque(int(x) for x in input().split())
count = 0
for x in set(de):
  print(de.count(x))
  count += 1
for i in range(n-count):
  print(0)
N = int(input())
A = input().split()
B = [0]*(N)
for i in range(0, len(A)):
    A[i] = int(A[i])
    B[A[i]-1] += 1

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

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

A.insert(0,0)
keys = set(A)
values = [A.count(i+1) for i in keys]
d = dict(zip(keys, values))
for i in A:
        print(d[i])
N=int(input())
A=list(map(int,input().split()))

import collections
c = collections.Counter(A)
values, counts = zip(*c.most_common())

ans=[]
for i in range(len(values)):
    ans.append([values[i],counts[i]])

ans.sort()
#print(ans)

t=0
for i in range(1,N+1):
    if t<len(ans):
        if ans[t][0]==i:
            print(ans[t][1])
            t+=1
    else:
        print(0)
N = int(input())
A = list(map(int, input().split()))

A.sort()

before = 1
tmp = 0
for i in range(N-1):
    if A[i] == before:
        tmp += 1
    else:
        print(tmp)
        before += 1
        tmp = 1

print(tmp)

for i in range(N-before):
    print(0)
from collections import deque
N=int(input())
A = deque(list(map(int, input().split())))
for i in range(N):
    ans =0
    while len(A)>0:
        
        if A[0] == i+1:
            A.popleft()
            ans +=1
        else:
            break
    print(ans)
n = int(input())

boss_list = map(int, input().split())

employee_list = [0] * (n - 1)

for boss in boss_list:
	employee_list[boss - 1] += 1
	
for employee in employee_list:
	print(employee)
def main():
    N = int(input())
    A = list(map(int, input().split()))

    import collections

    C = collections.Counter(A)
    for a, b in C.items():
        print(b)
    for _ in range(N-len(C)):
        print(0)


if __name__ == '__main__':
    main()
n=int(input())
a=list(map(int, input().split()))
b=[0]*n
for i in range(1,n+1):
  b[i-1]=a.count(i)
for i in b:
  print(b)
inon = input().split(" ") #社員表
intw = input().split(" ") #上司リスト
numbuka = list()
num = 0
for e in range(int(inon[0])):
  num = 0
  enumt = e + 1 #探す対象の社員番号
  for i, j in enumerate(intw):
    if int(j) == int(enumt):
      if i < enumt: #部下のIndexより社員番号のほうがでかければ
        num+=1 #数追加
  numbuka.append(num)
for ele in numbuka:
  print(ele)
N = int(input())
A = list(map(int, input().strip().split()))
i = 1

while i < N:
    print(A.count(i))
    i += 1
import collections
n = int(input())
a = list(map(int, input().split()))

ans = [0]*n
a.sort()
a = collections.deque(a)
counter = 0
tem = a[0]
for i in range(1, n+1):
    while i == tem and len(a) != 0:
        tem = a.popleft()
        if i != tem: 
            break
        counter += 1    
    print(counter)
    counter = 0
N = int(input())
A = [0, 0] + [int(x) for x in input().split()]

buka = [0] * (N + 1)

for i in range(2, N + 1):
    buka[A[i]] += 1
    print("A[{}] = {}".format(i, A[i]))

for i in range(1, N + 1):
    print(buka[i])
N=int(input())
A=list(map(int,input().split()))
B=set(A)
for i in range(1,N+1):
  if i in B:
    print(A.count(i))
  else:
    m=i
    break
for j in range(N+1-m):
  print(0)
n = int(input())
a = list(map(int,input().split()))

x = [0]*n
j = 0
for i in range(n):
    k = 0
    while j < n-1:
        if i+1 == a[j]:
            j=j+1
            k=k+1
        else:
            break
    x[i] = k

ans = [print(_) for _ in x]
N = int(input())
A = list(map(int,input().split()))
out = []
for i in range(1, 5+1):
    if i not in A:
        out.append(0)
    else:
        out.append(A.count(i))
for a in out:
  print(a)
N = int(input())
A = [int(elem) for elem in input().split()]
count = [0]*N
for i in A:
    count[i-1] = count[i-1]+1   
print(count)
N = int(input())
A = list(map(int, input().split()))
A = [0] + A
checked = [0] * N
for i, a in enumerate(A):
    count = 0
    for j in range(i, N):
        if A[j] == a+1 and checked[j] == 0:
            count += 1
            checked[j] = 1
        elif A[j] > a+1:
            break
    print(count)
N=int(input())
A=list(map(int,input().split()))
for i in range(N-1):
    print(A.count(i))
print("0")
n = int(input())
a = list(map(int,input().split()))
ans = []
for i in range(1,n+1):
    ans.append(a.count(i))
    if sum(ans) == n-1:
        for k in range(1,n-i):
            ans.append(0)
            break
for j in ans:
    print(j)
N=int(input())
a=list(map(int, input().split()))
l=[]

l.append(a.count(1))
for i in range(len(a)):
    if i==0:
        x=a.count(a[i]+1)
        l.append(x)
    else:
        if a[i-1]!=a[i-1]:
            x=a.count(a[i]+1)
            l.append(x)
        else:
            l.append(0)
for i in range(N):
    print(l[i])
N = int(input())
a = list(map(int, input().split()))
li = [0] * N
print(li)

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

for i in range(N):
    print(li[i])
import sys
from collections import Counter
from typing import Callable, NoReturn, Tuple


def main() -> NoReturn:
    scan: Callable[[], str] = sys.stdin.readline

    n: int = int(scan().rstrip())
    a: Tuple[int] = tuple(int(a_i) for a_i in scan().rstrip().split())

    count: Counter = Counter(a)

    for i in range(n):
        print(count[i])


if __name__ == '__main__':
    main()
# C - management

import collections

n = int(input())
A = list(int(x) for x in input().split())

c = collections.Counter(A)

print(c)

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

num.sort()
cnt = 0
work = 0
sum = 0
flg = 0
for i in num:
  if work != i:
    if work != 0:
      print(cnt)
      sum += 1
    cnt = 1
    work += 1
  elif work == i:
    cnt += 1

print(cnt)
sum += 1
sum = int(n) - sum
for i in range(sum):
  print(0)
n = int(input())
a = list(map(int, input().split()))

a.sort()
x = a[0]
counter = 1
for i in range(1, n-1):
  if x == a[i]:
    counter += 1
    continue
  else:
    if x+1 == a[i]:
      print(counter)
      x += 1
      counter = 0
    else:
      print(0)
      x += 1
print(counter)
n = int(input())
a = list(map(int, input().split()))
ans = [0]*n
for i in range(n-1):
  ans[a[i]-1] += 1
print(a)
[print(i) for i in ans]
import sys
sys.setrecursionlimit(4100000)
input = sys.stdin.readline
N = int(input()) #社員数
joushi_no_bangou = [0] #上司の社員番号
ans = []
joushi_no_bangou += map(int,input().split())
# print(joushi_no_bangou.count(i+1))
print(*joushi_no_bangou,sep='\n')
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)

for i in range(1, n + 1):
    b = a.count(i)
    if b > 0:
        a = a[a.index(i):]
    if b == 0:
        print('0\n' * (n-i+1))
        break
    else:
        print(b)
import numpy as np

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

boss=[0]*N

for x in A:
    boss[x-1] += 1
for i in boss:
    print(int(boss[i]))
N = int(input())
A = list(map(int, input().split()))
cnt1 = 0
cnt2 = 0
master = 0
masterA = []

while cnt2 < N-1:
    if 0 < A[cnt2]:
        master = master + 1
    cnt2 = cnt2 + 1

masterA.append(master)
cnt2 = 0
master = 0

while cnt1 < N-1:
    while cnt2 < N-1:
        if A[cnt1] < A[cnt2]:
            master = master + 1
        cnt2 = cnt2 + 1
    masterA.append(master)
    master = 0
    cnt2 = 0
    cnt1 = cnt1 + 1

for i in masterA:
    print(i)
from sys import stdin

def main():
  N = int(input())
  l = list(map(int, input().split(" ")))
  
  _ = [print(l.count(n+1))for n in range(N)]
  
  
  
if __name__ == "main":
  main()
N=int(input())
A=[int(x) for x in input().split()]
M=[0 for i in range(N)]

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