CodeEff/ECCO huggingface dataset:
# 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()))
number=[0]*n
for i in range(n-1):
    number[a[i]-1]+=1
for i in range(n):
    print((number[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
import sys

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

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

for i in range(1, n + 1):
  print((a.count(i)))
  [n for n in a if n!= i ]

# Optimized solution
n = int(eval(input()))

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

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

# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
a={}
for i in range(1,N+1):
  a.update({i:0})
for j in A:
  a[j]+=1
for k,l in list(a.items()):
  print(l)
# Original solution
s = input().split()
n = int(s[0])
s = input().split()
d = {}

for i in s:
    if i in d:
        d[i]+=1
    else:
        d[i]=1
keys=list(d.keys())

for i in range(1,n+1):
    if str(i) in keys:
        print((d[str(i)]))
    else:
        print((0))


# Optimized solution
s = input().split()
n = int(s[0])
s = input().split()
d = [0]*n
for i in s:
    d[int(i)-1]+=1

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

# Optimized solution
n = int(eval(input()))
ls = list(map(int,input().split()))
a = [0]*(n)
p = 0
for i in range(n-1):
    p = ls[i] 
    a[p-1] +=1
for j in range(n):
    print((a[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]*(n+1)

for i in range(n-1):
    ans[a[i]]+=1
ans.pop(0)
for j in ans:
    print(j)
# Original solution
import collections
n=int(eval(input()))
a=list(map(int,input().split()))
for i in range(1,n+1):
  print((collections.Counter(a)[i]))

# Optimized solution
import collections
n=int(eval(input()))
c=collections.Counter(list(map(int,input().split())))
for i in range(1,n+1):
  print((c[i]))
# Original solution
n = int(eval(input()))
a = [int(i) for i in input().split()]
def CountFrequency(my_list,n1): 
    count1 = 0
    freq = {} 
    for items in my_list: 
        freq[items] = my_list.count(items) 
    for key, value in list(freq.items()):
    	print(value)
    	count1+=1
    if(count1!=n1):
        for i in range(n1-count1):
            print("0")
CountFrequency(a,n)

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

for r in result:
    print(r)


# Optimized solution
N = int(eval(input()))
A = sorted(list(map(int, input().split())))
least = 1
result = [0] * N
for a in A:
    result[a-1] += 1
    if a != least:
        least = a

for r in result:
    print(r)
# Original solution
size = int(eval(input()))
li = list(map(int,input().split()))
from collections import Counter
c1 = Counter(li)
ans2 = [0] * size
for i,j in list(c1.items()):
    ans2[i-1] = j
for i in ans2:
    print(i)

# Optimized solution
from sys import stdin,stdout
size = int(stdin.readline())
li = list(map(int,stdin.readline().split()))
"""ans = [0]*size
for i in li:
    if i not in ans:
        ans[i-1] = 1
    else:
        ans[i-1] += 1
for i in ans:
    print(i)
"""
from collections import Counter
c1 = Counter(li)
ans2 = [0] * size
for i,j in list(c1.items()):
    ans2[i-1] = j
for i in ans2:
    stdout.write(str(i)+"\n")
# Original solution
N = int(eval(input()))
A = list(map(int,input().strip().split()))
M = [0] * N

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

for j in range(0, N):
    print((M[j]))
    j += 1


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


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

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


# Optimized solution
N = int(input())
l = [0]*N
A = [j for j in map(int, input().split())]

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

print(*l, sep="\n")
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
A.insert(0, 0)
for i in range(N):
    tmp = 0
    for j in range(i+1, N):
        if(i+1 == A[j]):
            tmp += 1
        else:
            pass
    print(tmp)

# Optimized solution

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

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


# Optimized solution

n = int(eval(input()))
a = list(int(i) for i in input().split())
lst = [0] * (n + 1)

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

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

# lは社員番号i(=1,...,N)の部下の人数を格納するリスト
l = [0]*N
for i in A:
  l[i-1] += 1

for i in l:
  print(i)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
 
# 各社員i(=1,...,N)についてそれぞれ、部下の人数を数えればよい
l = [0]*N
for i in A:
  l[i-1] += 1

for i in l:
  print(i)
# Original solution
def main():
    N = int(eval(input()))
    A = [int(i) for i in input().split()]
    from collections import Counter
    c = Counter(A)
    for i in range(N):
        print((c[i+1]))


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    N = int(eval(input()))
    A = [int(i) for i in input().split()]
    from collections import Counter
    c = Counter(A)
    for i in range(1, N+1):
        print((c[i]))


if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
As = list(map(int, input().split()))
preans = [n for n in range(N)]
for n in range(1, N):
    preans[n] = As[n-1] - 1
del preans[0]
for n in range(N):
    print((preans.count(n)))

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

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

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

for j in range(N):
  print((cnt[j]))
# Original solution
import collections
n = int(eval(input()))
a = [int(i) for i in input().split()]
a.sort()
c = collections.Counter(a)
l = [0]*n
for i,x in list(c.items()):
    l[i-1] = x
    
for i in l:
    print(i)

# Optimized solution
n = int(eval(input()))
a = [int(i) for i in input().split()]
l = [0]*(n+1)
for i in a:
    l[i] += 1

for i in l[1:]:
    print(i)
# Original solution
N=int(eval(input()))
A=list(map(int,input().split()))
ans=[0]*N
for i in range(1,N):
  ans[i]=A.count(i)
  print((ans[i]))
print((A.count(N)))


# 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
del ans[0]
ans.append(A.count(N))
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):
    num=a.count(i)
    while True:
        if i in a:
            a.remove(i)
        else:
            break
    print(num)

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

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

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


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

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

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

for i in range(N):
    print((ans[i + 1]))


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

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

N = n[0].pop(0)
A = n[1]

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

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

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

print(*count_list, sep='\n')
# Original solution
N=int(eval(input()))
alist=list(map(int, input().split()))
alist.sort()
aa=alist[0]
anslist=[0]*N
for i in range(1,N+1):
    anslist[i-1]=alist.count(i)
for ans in anslist:
    print(ans)


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

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


# Optimized solution
import sys
from collections import Counter

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N = ini()
ac = Counter(inl())


for i in range(1, N + 1):
    print(ac[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(input())
A = list(map(int, input().split()))

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

[print(i) for i in ans]
# 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 = {i:0 for i in range(1,N+1)}
for i in range(N-1):
    c[A[i]] += 1
for i in range(1,N+1):
    print((c[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()))
x=[0]*n
for i in a:
  x[i-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(input())
a = list(map(int,input().split()))
li = [0]*n
for i in a:
    li[i-1] += 1
print(*li, sep="\n")
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

ans = [0] * N

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

for _ in ans:
    print(_)


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

ans = [0] * N

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

print(('\n'.join(map(str, ans))))
# Original solution
n=int(eval(input()))
hw=list(map(int,input().split()))

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



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

o={}
for i in range(1,n+1):
  o[i]=0
  
for p in m:
  o[p]+=1

for i in range(1,n+1):
  print((o[i]))
# Original solution
from collections import Counter

N = int(eval(input()))
A = list(map(int,input().split()))
X = Counter(A)
for i in range(1,N+1):
    if i in A:
        print((X[i]))
    else:
        print((0))


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

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

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

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
m = [0] * (n+1)
for i in a:
    m[i] += 1
for i in m[1:]:
    print(i)
# Original solution
N = int(input().strip())
A = [ int(i) for i in input().strip().split(' ')]
#unique_supervisor = list(set(A))

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

# Optimized solution
N = int(input().strip())
data = [0 for _ in range(N)]
for i in input().strip().split(' '):
    data[int(i)-1] += 1

for d in data:
    print(d)
# Original solution
N = int(input())
A = list(map(int,input().split()))
ans = [0]*N
for i in range(1,N+1):
    ans[i-1]=A.count(i)
print(*ans,sep="\n")


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

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

for k in ans:
    print(k)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split(sep=" ")))
for i in range(1,N+1,1):
    print((A.count(i)))

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split(sep=" ")))
Acounter = []
for i in range(0,N,1):
    Acounter.append(0)
for i in range(0,N-1,1):
    Acounter[A[i]-1]+=1
for i in range(0,N,1):
    print((Acounter[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 range(len(a)):
    b[a[i]-1]+=1
for i in b:
    print(i)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

keys = [0]*N
for i in range(N):
    keys[i] = i+1


num = {key:0 for key in keys}
for i in A:
    num[i] += 1

for i in range(N):
    print((num[i+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 i in ans:
    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())) 

c = [0] * N

for i in range(N-1):
    c[A[i]-1] = c[A[i]-1] + 1
   
for j in c:
    print(j)
# Original solution
n=int(eval(input()))
x=[x for x in input().split()]
for i in range(1,n+1):
    print((x.count(str(i))))

# Optimized solution
n=int(eval(input()))
x=input().split()
l=[0 for i in range(n)]
for i in range(n-1):
    l[int(x[i])-1]=l[int(x[i])-1]+1
for i in range(n):
    print((l[i]))
# Original solution
def main():
  n = int(eval(input()))
  l = list(map(int, input().split()))
  for i in range(n):
    print((l.count(i+1)))

if __name__ == '__main__':
  main()

# Optimized solution
def main():
  n = int(eval(input()))
  l = list(map(int, input().split()))
  ans = [0] * n
  for i in range(n-1):
    ans[l[i]-1] += 1
  for i in ans:
    print(i)

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

DP = [0 for i in range(N+1)]
for i in A:
  DP[i] += 1
  
for i in DP[1:]:
  print(i)


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

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

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

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

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

l=[]
for i in range(n,0,-1):
  l.append(syain.count(i))
  syain = [s for s in syain if s != i]

for i in range(n):
  print((l[n-1-i]))

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

b = [0]*(n+2)

for i in range(n-1):
  b[a[i]] += 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(1,n+1):
    print((a.count(i)))
    

# Optimized solution
n = int(eval(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 range(1,n+1):
    print((l[i]))
# Original solution
import sys
input = sys.stdin.readline

# C - management
N = int(eval(input()))
A = list(map(int, input().split()))
dic = dict()

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

for a in A:
	dic[a] += 1

for v in list(dic.values()):
	print(v)

# Optimized solution
import sys
input = sys.stdin.readline

# C - management
N = int(eval(input()))
A = list(map(int, input().split()))
bosses = dict()

for a in A:
  if a in list(bosses.keys()):
	  bosses[a] += 1
  else:
    bosses[a] = 1

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

m = 0
t = 0

for i in range(1, n):
    count = A.count(i)
    print(count)
    m += count
    t = i
    if m == n - 1:
        break
for _ in range(t, n):
    print((0))


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

# m = 0
# t = 0

# for i in range(1, n):
#     count = A.count(i)
#     print(count)
#     m += count
#     t = i
#     if m == n - 1:
#         break
# for _ in range(t, n):
#     print(0)

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()))
def count(n, a):
    c = 0
    for i in range(len(a)):
        if a[i] == n:
            c += 1
    return c
for j in range(N):
    print((count(j+1, A)))

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
buka = list()
for i in range(N):
    buka.append(0)
for j in range(len(A)):
    buka[A[j]-1] += 1
for k in range(len(buka)):
    print((buka[k]))
# Original solution
import math
def ii(): return int(eval(input()))
def mi(): return list(map(int, input().split()))
def li(): return list(mi())
n = ii()
a = li()
b = [0]*n
for i in range(n):
    b[i] = a.count(i+1)
for i in range(n):
    print((b[i]))

# Optimized solution
import math
def ii(): return int(eval(input()))
def mi(): return list(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]))
# Original solution
N = int(eval(input()))
rst = [0] * N
A_ls = list(map(int, input().split(' ')))
for i in A_ls:
    rst[i - 1] += 1
for i in rst:
    print(i)

# Optimized solution
N = int(eval(input()))
A_ls = list(map(int, input().split(' ')))
ls = [0] * N
for i in A_ls:
    ls[i - 1] += 1
for i in ls:
    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()))
B = [0]*n

for i in range(n-1):
    B[A[i]-1] += 1

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


# 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 range(N):
  print((ans[j]))
# Original solution
def f(N,L):
    S=N*[0]
    for i in range(N-1):
        S[L[i]-1]+=1
    return S
N=int(eval(input()))
L=list(map(int,input().split()))
for j in range(N):
    print((f(N,L)[j]))
        

# Optimized solution
def f(N,L):
    S=N*[0]
    for i in range(N-1):
        S[L[i]-1]+=1
    return S
N=int(eval(input()))
L=list(map(int,input().split()))
A=f(N,L)
for j in range(N):
    print((A[j]))
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
b = [0]*n
for i in range(n):
    for j in range(len(a)):
        if i + 1 == a[j]:
            b[i] += 1
    print((b[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 j in b:
    print(j)
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
for i in range(1,n+1):
    ans=a.count(i)
    print(ans)

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

import collections
list2 = collections.Counter(list)

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

# Optimized solution
n = int(eval(input()))
#カウント用のリスト作成
a = list()
for i in range(n):
  a.append(0)

#入力リスト
b = [int(e) for e in input().split()]

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

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


# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
result=[0]*N
for a in A:
    result[a-1]+=1
print(("\n".join(map(str,result))))