CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
ls_a = list(map(int,input().split()))

for i in range(1,n+1):
    count = 0
    for j in ls_a:
        if i == j:
            count += 1
    print(count)

# Optimized solution
n = int(eval(input()))
ls_a = list(map(int,input().split()))
ls = [0]*n
for i in ls_a:
    ls[i-1] += 1

for i in ls:
    print(i)
# Original solution
from collections import deque

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

for i in range(n):
    print((a.count(i+1)))
    if a.count(i+1)!=0:
        while len(a)!=0 and a[0]==i+1:
            a.popleft()

# Optimized solution
n=int(input())
a=list(map(int,input().split()))
b=[0]*n

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

[print(i) for i in b]
# Original solution
n=int(eval(input()))
a=list(input().split())

for i in range(1,n+1):
    print((a.count(str(i))))

# Optimized solution
n=int(eval(input()))
a=list(input().split())

l = [0 for _ in range(n+1)]
for i in a:
    l[int(i)]+=1

for j in range(1,n+1):
    print((l[j]))
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
for i in range(n):
    count = 0
    while True:
        if i+1 in a:
            a.remove(i+1)
            count += 1
        else:
            break
    print(count)

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
# for i in range(n):
#     count = 0
#     while True:
#         if i+1 in a:
#             a.remove(i+1)
#             count += 1
#         else:
#             break
#     print(count)
b = [0]*n
for i in range(n-1):
    b[a[i]-1] += 1
for i in range(n):
    print((b[i]))
# Original solution
import sys
from collections import deque
def main():
    n = int(eval(input()))
    q = deque(list(map(int, sys.stdin.readline().split())))
    cnt=1
    while q:
        print((q.count(cnt)))
        cnt +=1
        q.popleft()
    print((0))

if __name__ == '__main__':
    main()

# Optimized solution
import collections
N = int(eval(input()))
A = list(map(int, input().split()))
count = collections.Counter(A)
for n in range(N):
  print((count[n+1]))
# Original solution
from collections import Counter, deque
n = int(eval(input()))
a = deque(list(map(int, input().split())))
c = Counter(a)
for i in range(1, n+1):
    if i in list(c.keys()):
        print((c[i]))
    else:
        print((0))


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
buka = [0]*n
for i in range(n-1):
    buka[a[i]-1] += 1
for i in range(n):
    print((buka[i]))
# Original solution
N=int(eval(input()))
A = list(map(int,input().split()))
for i in range(1,N+1):
    print((A.count(i)))


# Optimized solution
N=int(eval(input()))
A = list(map(int,input().split()))
ans = [0]*N
for i in range(len(A)):
    ans[A[i]-1] += 1
    #print(ans)
for i in range(N):
    print((ans[i]))
# Original solution
num = int(eval(input()))
a = list(map(int, input().split()))

for i in range(1, num+1):
    print((a.count(i)))

# Optimized solution
num = int(eval(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]))
# Original solution
N=int(eval(input()))
A=list(map(int, input().split()))
A=sorted(A)
s=0
for num in range(1, N+1):
  count = 0
  for i in range(s, N-1):
    if A[i] == num:
      count += 1
  s+=count
  print(count)

# Optimized solution
N=int(eval(input()))
A=list(map(int, input().split()))
A=sorted(A)
s=0
for num in range(1, N+1):
  count = 0
  for i in range(s, N-1):
    if A[i] == num:
      count += 1
    else:
      break
  s+=count
  print(count)
# Original solution
N = int(eval(input()))
A_i = list(map(int,input().split()))

for i in range(N):
    print((A_i.count(i+1)))

# Optimized solution
N = int(eval(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]))
# Original solution
n=int(eval(input()))
a=list(map(int, input().split()))
for i in range(1,n+1):
  print((a.count(i)))

# Optimized solution
n=int(eval(input()))
a=list(map(int, input().split()))
b= [0]*n
for i in a:
  b[i-1]+=1
for i in b:
  print(i)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
for i in range(1, N + 1):
    print((A.count(i)))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
li = []
for i in range(n):
    li.append(0)
for x in a:
    li[x-1] += 1
for s in li:
    print(s)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

for i in range(n):
  print((a.count(i+1)))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
c = [0]*n

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

for j in range(n):
  print((c[j]))
# Original solution
N=int(eval(input()))
A=list(map(int,input().split()))
ans=[]
for i in range(N-1):
    ans.append(A.count(i+1))
ans.append(0)
print(("\n".join(list(map(str, ans)))))

# Optimized solution
n = int(eval(input()))
 
boss_list = list(map(int, input().split()))
 
employee_list = [0] * n
 
for boss in boss_list:
	employee_list[boss - 1] += 1
 
for employee in employee_list:
	print(employee)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
for x in range(N):
    print((A.count(x+1)))

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
count_array = [0] * N
for x in range(N - 1):
    count_array[A[x] - 1] += 1
for y in count_array:
    print(y)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
l = [0]*N
for i in range(N-1):
  l[A[i]-1] += 1
for i in range(N):
  print((l[i]))

# Optimized solution
N = int(input())
A = list(map(int,input().split()))
l = [0]*N
for i in A:
  l[i-1] += 1
print(*l,sep="\n")
# Original solution
N = int(eval(input()))

employee = input().split(" ")

for i in range(1, N+1):
    print((employee.count(str(i))))

# Optimized solution
N = int(eval(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]))
# Original solution
from collections import Counter
n=int(eval(input()))
a=list(map(int,input().split()))
for i in range(1,n+1):
  print((Counter(a)[i]))


# Optimized solution
from collections import Counter
n=int(eval(input()))
a=list(map(int,input().split()))
c=Counter(a)
for i in range(1,n+1):
  print((c[i]))
# Original solution
N = int(eval(input()))
Mgr = [int(num) for num in input().split()]

for i in range(1, N+1):
        ans = Mgr.count(i)
        print(ans)


# Optimized solution
N = int(eval(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]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

ans = []*N
for i in range(1,N):
    print((A.count(i)))
print((0))

# Optimized solution
N = int(eval(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]))
# Original solution
import copy
n=int(eval(input()))
A=list(map(int,input().split()))

for i in range(n):
    print((A.count(i+1)))


# Optimized solution
import copy
n=int(eval(input()))
A=list(map(int,input().split()))
L=[0]*n

for x in A:
    L[x-1] += 1
for i in L:
    print(i)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

ans = [0] * n

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

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

# Optimized solution
n = int(eval(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]))
# Original solution
N=int(eval(input()))
A=list(map(int,input().split()))
for i in range(1,N+1):
  print((A[i-1:].count(i)))

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
ans_list = [0]*N

for i in range(N-1):
  ans_list[A[i]-1] += 1
  
for j in range(N):
  print((ans_list[j]))
# Original solution
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))

    for i in range(N):
        print((A.count(i + 1)))

if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))

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

    for i in l:
        print(i)

if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
number = []
n = 0

for i in range(N):
  n = A.count(i)
  number.append(n)
  if n != 0:
    A.remove(i)
  n = 0

del number[0]
number.append(0)
for Answer in number:
  print(Answer)


# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
number = []
for i in range(N):
  number.append(0)

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

del number[0]
number.append(0)
for Answer in number:
  print(Answer)
# Original solution
n=eval(input())
a=list(map(int,input().split()))
for i in range(1,n+1):
    print(a.count(i))

# Optimized solution
n=eval(input());a=list(map(int,input().split()));d={}
for i in range(1,n+1):d[i]=0
for i in a:d[i]+=1
for i in range(1,n+1):print(d[i])
# Original solution
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()))
for i in range(1,N+1):
    print((A.count(i)))

# Optimized solution
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()))
B = [0]*(N+1)
for i in range(N-1):
    B[A[i]] += 1
print(('\n'.join([str(n) for n in B[1:]])))
# Original solution
n = int(eval(input()))
a = input().replace(" ", "")

for i in range(1, n):
    print((a.count(str(i))))

print((0))

# Optimized solution
n = int(eval(input()))
b = [0] * n
a = list(map(int, input().split()))

for i in a:
    b[i-1] += 1
for i in b:
    print(i)
# Original solution
N = int(eval(input()))
a_list = list(map(int, input().split()))
result_list = [0] * N

for i in range(N):
    for a in a_list:
        if i == a:
            result_list[i-1] += 1

# 最後の改行を削除
result_list_str = [str(i) for i in result_list]
print(('\n'.join(result_list_str)))


# Optimized solution
N = int(eval(input()))
a_list = list(map(int, input().split()))
result_list = [0] * N

for a in a_list:
    result_list[a-1] += 1

result_list_str = [str(i) for i in result_list]
print(('\n'.join(result_list_str)))
# Original solution
# input
n = int(eval(input()))
inp_ls = input().split(" ")
a_ls = [int(e) for e in inp_ls[:n-1]]

# calc
w_ls = {i+1: 0 for i in range(n)}
for a in a_ls:
	w_ls[a] += 1

# result
for i in range(n):
	print((w_ls[i+1]))

# Optimized solution
# input
n = int(eval(input()))
inp_ls = input().split(" ")
a_ls = [int(e) for e in inp_ls[:n-1]]

# calc
w_ls = [0 for i in range(n)]
for a in a_ls:
	w_ls[a-1] += 1

# result
for w in w_ls:
	print(w)
# Original solution
#C
M = int(eval(input()))
A = list(map(int, input().split())) 
ans = [0] * M

for i in range(1,M+1):
    ans[i-1]=A.count(i)
    if sum(ans)>=M:
        break
    
for a in ans:
    print(a)

# Optimized solution
#C
M = int(eval(input()))
A = list(map(int, input().split())) 
ans = [0] * M

for i in range(M-1):
    ans[int(A[i])-1]+=1
    
for a in ans:
    print(a)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

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


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

# import collections
# for i in range(1, n + 1):
#   print(collections.Counter(a)[i])

b = [0] * (n + 1)

for e in a:
  b[e] += 1

for i in range(1, n + 1):
  print((b[i]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

for i in range(N):
    s = A.count(i+1)
    print(s)
    

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
S = [0 for i in range(N)]

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

for i in range(N):
    print((S[i]))
# Original solution
import collections

n = int(eval(input()))
data = list(map(int, input().split()))

c = collections.Counter(data)

for i in range(1, n+1):
  print((c[i]))


# Optimized solution
import collections

n = int(eval(input()))
data = list(map(int, input().split()))

count = [0] * n

for d in data:
  count[d-1] += 1

for c in count:
  print(c)
# Original solution
import copy
import math
n=int(eval(input()))
x=[list() for a in range(n)]
y=list(map(int,input().split()))
for t in y:
    x[t-1].append("a")
for s in x:
    print((len(s))) 

# Optimized solution
n = int(eval(input()))
li = list(map(int,input().split()))
li.sort(reverse = True)
count = 0
for i in range(1,n+1):
    count = 0
    while True:
        if li:
            if li[-1]==i:
                count+=1
                li.pop()
            else:
                break
        else:
            break
    print(count)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
for i in range(1, N + 1):
  print((A.count(i)))

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
ans = [0 for i in range(N)]
for a in A:
  ans[a - 1] += 1
for a in ans:
  print(a)
# Original solution
n = int(eval(input()))
bs = list(map(int, input().split()))
for i in range(n):
    print((bs.count(i + 1)))

# Optimized solution
n = int(eval(input()))
bs = list(map(int, input().split()))
sb = [0] * n
for i in bs:
    sb[i - 1] += 1
for i in sb:
    print(i)
# Original solution

import collections
n=int(eval(input()))
s=list(map(int, input().split()))
c=collections.Counter(s)
for i in range(1,n+1):
    b=s.count(i)
    print(b)


# Optimized solution

import collections
n=int(eval(input()))
s=list(map(int, input().split()))
c=collections.Counter(s)
for i in range(1,n+1):

    print((c[i]))
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
ans = []
for i in range(1,n+1):
    ans.append(a.count(i))
    a = [n for n in a if n != i]
for j in ans:
    print(j)

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
ans = [0]*n
for i in a:
    ans[i-1] += 1
for j in ans:
    print(j)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

for i in range(N):
    print((A.count(i+1)))


# Optimized solution
N = int(eval(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)
# Original solution
N = int(eval(input()))
employee = list(map(int, input().split()))
for i in range(1, N+1):
    print((employee.count(i)))

# Optimized solution
N = int(eval(input()))
employee = list(map(int, input().split()))
subordinate = [0] * N
for i in range(N-1):
    subordinate[employee[i]-1] += 1
for s in subordinate:
    print(s)
# Original solution
N = int(eval(input()))
K = [0]*(N)
A = list(map(int,input().split()))
for i in range(N-1):
    K[A[i]-1] += 1
for i in range(len(K)):
    print((K[i]))

# Optimized solution
N = int(eval(input()))
L = list(map(int,input().split()))
ans = [0 for i in range(N)]
for i in range(len(L)):
  ans[L[i]-1] += 1
for i in range(N):
  print((ans[i]))
# Original solution
num = int(eval(input()))
list = list(map(int, input().split()))
for x in range(num):
    print((list.count(x + 1)))

# Optimized solution
num = int(eval(input()))
list = list(map(int, input().split()))
ans = [0] * (num + 1)
for x in list:
    ans[x] += 1
for x in range(num):
    print((ans[x + 1]))
# Original solution
import collections
n = int(eval(input()))
a = list(map(int,input().split()))

count = 0
c = collections.Counter(a)
c_value = list(c.values())
c_key = list(c.keys())


i = 1
flag = True
count = 0
while flag:
  if i in list(c_key):
    print((c[i]))
    if count == n-1:
      flag = False
  else:
    print((0))
    if count == n-1:
      flag = False
  i += 1
  count += 1

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))

ans = [0] * n

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

for i in range(n):
  print((ans[i]))
# Original solution
n = int(eval(input())) 
a = list(map(int, input().split()))

for i in range(n):
    print((a.count(i+1)))

# Optimized solution
n = int(eval(input())) 
a = list(map(int, input().split()))
x = [0]*n
for i in a:
    x[i-1] += 1
for _ in x:
    print(_)
# Original solution
n, *a = list(map(int, open(0).read().split()))
for i in range(1, n + 1):
    print((a.count(i)))
    a = list([x for x in a if x != i])

# Optimized solution
n, *a = list(map(int, open(0).read().split()))
bt = [None] + [0] * n

for ai in a:
    bt[ai] += 1

for a in bt[1:]:
    print(a)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))


def count(N,A):

    for i in range(N):
        print((A.count(i+1)))
        if i+1 in A:
            A.remove(i+1) 
count(N,A)

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
Ansbox = [0]*(N+1)

def count(N,A,Ansbox):

    for i in range(N- 1):
        Ansbox[A[i] - 1] += 1
        
    for i in range(N):
        print((Ansbox[i]))
        
count(N,A,Ansbox)
# Original solution
a=int(eval(input()))
b=list(map(int,input().split()))
c={}
for i in set(b):
    c[i]=b.count(i)


for i in range(a):
    if i+1 in b:
        print((c[i+1]))
    else:
        print((0))

# Optimized solution
a=int(eval(input()))
b=list(map(int,input().split()))
c={}
for i in range(len(b)):
    try:
        c[b[i]]+=1
    except KeyError:
        c[b[i]]=1

    
for i in range(a):
    try:
        print((c[i+1]))
    except KeyError:
        print((0))
# Original solution
N=int(eval(input()))
tmp=input().split(" ")

list=[]
for i in range(N-1):
    list.append(int(tmp[i]))

count=0
for i in range(1,N+1):
    for j in range(N-1):
        if i==list[j]:
            count+=1
    print(count)
    count=0

# Optimized solution
N=int(eval(input()))
tmp=input().split(" ")

list=[]
for i in range(N-1):
    list.append(int(tmp[i]))

answer=[0]*N

for i in range(N-1):
    answer[list[i]]+=1
answer.append(0)

for i in range(1,N+1):
    print((answer[i]))
# Original solution
N=int(eval(input()))
A=list(map(int, input().split()))
a=set(A)
for i in range(1,N+1):
    if i in a:
        print((A.count(i)))
    else:
        print((0))

# Optimized solution
N=int(eval(input()))
A=list(map(int, input().split()))
b=[0]*N
for i in A:
    b[i-1]+=1
for j in b:
    print(j)
# Original solution
n = int(eval(input()))
a = [i for i in map(int, input().split())]

for j in range(1,n+1):
  print((a.count(j)))

# Optimized solution
n = int(eval(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]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

from collections import defaultdict
d = defaultdict(int)

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

for n in range(1,N+1):
  print((d[n]))

# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
c = [0]*(N+1)
for ai in A:
  c[ai] +=1

for i in c[1:]:
    print(i)
# Original solution
N=int(eval(input()))
A=list(map(str, input().split()))

from collections import Counter

c = Counter(A)
ind = list(c)
for i in range(1,N+1):
    if str(i) in ind:
        print((c[str(i)]))
    else:
        print((0))



# Optimized solution
N=int(eval(input()))
A=list(map(int, input().split()))

x = [0]*N

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

for i in x:
    print(i)
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
for i in range(n):
    print((a.count(i+1)))

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
b=[]
for i in range(n):
    b.append(0)
for i in range(n-1):
    b[a[i]-1] +=1
for i in range(n):
    print((b[i]))
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

for i in range(N):
    print((A.count(i+1)))

# Optimized solution
N = int(eval(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)
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
for i in range(n):
    print((a.count(i+1)))

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

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

print(*ans, sep="\n")
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

b = sorted(a)
for i in range(1, n+1):
    print((b.count(i)))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

b = [0] * n
for i in a:
    b[i-1] += 1
for i in b:
    print(i)
# Original solution
n = int(eval(input()))

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

rg = list(range(1, n + 1))

for i in rg:
    c = ls.count(i)
    print(c)


# Optimized solution
n = int(eval(input()))
ls = list(map(int, input().split()))

ls2 =[0 for x in range(n)]
#0がn個のリストを用意する

for x in ls:
    ls2[x - 1] += 1

for x in range(n):
    print((ls2[x]))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

for i in range(n):
    print((a.count(i+1)))

# Optimized solution
n = int(eval(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]))
# Original solution
n = int(eval(input()))
a = input().split(" ")
lista = [int(n) for n in a]
for i in range (1,n):
  print((lista.count(i)))
print((0))

# Optimized solution
n = int(input())
a = input().split(" ")
lista = [int(n) for n in a]
listb = [0]*n
for i in range (n-1):
  l = lista[i]
  listb[l-1] += 1
[print(i) for i in listb]
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

for i in range(1, N+1):
    tmp = 0
    for a in A:
        if a == i:
            tmp+=1
    print(tmp)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
score = [0 for _ in range(N)]

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

for s in score:
    print(s)
# Original solution
def main():
    N = int(eval(input()))
    A = [x for x in input().split()]
    l = [0] * N
    C = list(set(A))
    for i in C:
        l[int(i)-1] = A.count(i)
    for i in range(N):
        print((l[i]))
        
main()

# Optimized solution
def main():
    N = int(eval(input()))
    A = [int(x) for x in input().split()]
    l = [0]*N
    for i in A:
        l[i-1] += 1
    for j in l:
        print(j)
main()
# Original solution
n=int(eval(input('')))
a= [int(s) for s in input().split(" ")]

for i in range(1,n+1):
    s=0
    for k in range(0,len(a)):
        if a[k]==i:
            s=s+1 
    print(s)

# Optimized solution
n=int(eval(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]))
# Original solution
N=int(eval(input()))
*A,=sorted(map(int,input().split()))

import bisect

for i in range(1,N+1):
    print((bisect.bisect_right(A,i)-bisect.bisect_left(A,i)))

# Optimized solution
N=int(eval(input()))
*A,=sorted(map(int,input().split()))

s=[0]*N
for i in A:
    s[i-1]+=1
for t in s:
    print(t)
# Original solution
n = int(eval(input()))
lst = list(map(int,input().split()))
for i in range(n):
  print((lst.count(i + 1)))

# Optimized solution
n = int(eval(input()))
lst = list(map(int,input().split()))
lst2 = [0 for i in range(n)]
for i in range(n - 1):
  x = lst[i]
  lst2[x - 1] = lst2[x - 1] + 1
for i in range(n):
  print((lst2[i]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

for n in range(N):
  print((A.count(n+1)))

# Optimized solution
n = int(eval(input()))
A = list(map(int,input().split()))

ans = [0]*n
for a in A:
  ans[a-1]+=1
for a in ans:
  print(a)
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))

for i in range(1,n+1):
    print((a.count(i)))


# Optimized solution
n = int(eval(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)