CodeEff/ECCO huggingface dataset:
# Original solution
num_sub  = int(eval(input()))
sub_boss = input().split()

num_boss = [0]*(num_sub)

for i in sub_boss:
	i = int(i)
	num_boss[i-1] = num_boss[i-1] + 1

for i in num_boss:
  print(i)

# Optimized solution
num_sub  = int(eval(input()))
sub_boss = input().split()

num_boss = [0]*(num_sub)

for i in sub_boss:
	num_boss[int(i)-1] += 1

for i in num_boss:
	print(i)
# Original solution
n = int(eval(input()))
A = list(map(int, input().split())) # n-1

from collections import Counter

c = dict(Counter(A))

for i in range(1, n + 1):
	print((c.get(i, 0)))

# Optimized solution
n = int(eval(input()))
A = [-1, -1] + list(map(int, input().split())) # n-1

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

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

ans = [a.count(i+1) for i in range(n)]

for i in ans:
  print(i)

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

a = [0 for _ in range(n)]
for i in input().split():
  a[int(i)-1] += 1


for i in a:
  print(i)
# Original solution
num_all = int(eval(input()))
list = input().split(" ")

i = 1
while i <= num_all:
  data = list.count(str(i))
  #print(i)
  print(data)
  i = i+1

# Optimized solution
n=int(eval(input()))
#l=list(map(int,input().split()))  #inputした数値列をintにしてlistを作成 けどなぜか使えない
list = input().split(" ")
list_int = []
for i in list:
  list_int.append(int(i)) 
k = [0]*n                         #大きさnのリスト
for i in list_int:
  k[i-1] = k[i-1]+1
for j in range(n):
  print((k[j]))
# Original solution
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()

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


if __name__ == '__main__':
    main()


# Optimized solution
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    ret = [0]*N
    for a in A:
        ret[a-1] += 1
    print(*ret, sep="\n")


if __name__ == '__main__':
    main()
# Original solution
syain=int(eval(input()))
syain2=syain-1
wariate=input().split(' ')
x=[]

for j in range(syain2):
    tmp=0
    for i in wariate:
        if j==int(i)-1:
            tmp+=1
        else:
            pass
    x.append(tmp)
x.append(0)

for i in x:
    print(i)

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

# 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 j in range(len(b)):
  print((b[j]))
# Original solution
import collections

N = int(eval(input()))
stuff = list(map(int, input().split()))

stuff_lis = collections.Counter(stuff)
st = list(stuff_lis.keys())
num = list(stuff_lis.values())
num_d = collections.deque(num)

for i in range(N):
    if i+1 in st:
        print((num_d.popleft()))
    else:
        print((0))


# Optimized solution
N = int(eval(input()))
A = list(input().split())
A = [int(A[i]) for i in range(N-1)]
ans = [0 for i in range(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.count(i)))

# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
B={}
for i in range(1,N+1):
    B[i]=0

for j in A:
    B[j]+=1

for l in list(B.values()):
    print(l)
# Original solution
n, a = int(eval(input())), 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()))
c = [0] * n
for i in a:
    c[i - 1] += 1
[print(i) for i in c]
# Original solution
n = int(eval(input()))
a = list(map(int, input(). split(' ')))
for i in range(1, n+1):
  x = a.count(i)
  print(x)

# Optimized solution
N = int(eval(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)
# Original solution
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float('inf')


def solve(N: int, A: "List[int]"):
    return "\n".join([str(A.count(i+1)) for i in range(N)])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N - 2 + 1)]  # type: "List[int]"
    print((solve(N, A)))


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import itertools
import math
import sys

INF = float('inf')


def solve(N: int, A: "List[int]"):
    c = collections.Counter(A+[i+1 for i in range(N)])
    return "\n".join([f'{c[i+1]-1}' for i in range(N)])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N - 2 + 1)]  # type: "List[int]"
    print((solve(N, A)))


if __name__ == '__main__':
    main()
# Original solution
# cook your dish here
n=int(eval(input()))
arr=list(map(int,input().split()))
for i in range(0,n):
    temp=0
    for j in range(len(arr)):
        if i+1==arr[j]:
            temp+=1
    print(temp)

# Optimized solution
# cook your dish here
n=int(eval(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)
# 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 A:
    ans[i-1]+=1
print(('\n'.join(map(str,ans))))
# Original solution
import collections

N = int(eval(input()))
A_list = list(map(int, input().split()))
A_collection = collections.Counter(A_list)

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


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

for i in A_list:
    bosses[i-1] += 1
for boss in bosses:
    print(boss)
# 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_l = [0]*n
for i in A:
    ans_l[i-1]+=1
for i in ans_l:
    print(i)
# Original solution
#163C
#management

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

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

# Optimized solution
#163C
#management

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]))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
a = list([x - 1 for x in a])

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

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
a = list([x - 1 for x in a])

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

for cnt in cnts:
    print(cnt)
# Original solution
import collections
N = int(eval(input()))
A = list(map(int, input().split()))

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

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

for i in range(1,N+1):
  print((count[i]))
# Original solution
n = int(eval(input()))
s = input().split()
count = 0
for i in range(n-1):
    if s[i] == '1':
        count += 1
print(count)
for i in range(n-1):
    count = 0
    num = i + 2
    for j in range(i+1,n-1):
        NUM = int(s[j])
        if NUM == num:
            count += 1
    print(count)

# Optimized solution
n = int(eval(input()))
s = input().split()
A = [[0] for i in range(n)]
for i in range (n-1):
    j = int(s[i])-1
    A[j] += [1]
for i in range(n):
    print((len(A[i])-1))
# Original solution
n = int(eval(input()))
a = list(map(str, input().split()))
A = list(set(a))
ans = ["0"]*n
for ai in A:
  ans[int(ai)-1] = str(a.count(ai))
print(("\n".join(ans)))

# 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] = str(int(ans[a[i]-1])+1)
print(("\n".join(ans)))
# Original solution
import itertools
import math
import fractions
import functools
n = int(eval(input()))
a = list(map(int, input().split()))

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

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



# Optimized solution
import itertools
import math
import fractions
import functools
n = int(eval(input()))
a = list(map(int, input().split()))

count = [0] * n

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

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

for i in range(1, n + 1):
    cnt = 0
    for j in range(n - 1):
        if i == a[j]:
            cnt += 1
    l.append(cnt)
            
for k in range(n):
    print((l[k]))


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

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


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

ans_list = [0] * num

for i_boss in boss:
    ans_list[int(i_boss)-1] += 1
a = list([str(x) for x in ans_list])
print(('\n'.join(a)))


# Optimized solution
num = int(eval(input()))
boss = input().split()
ans_list = [0] * num
for i_boss in boss:
    ans_list[int(i_boss)-1] += 1
print(('\n'.join(list(map(str, ans_list)))))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

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


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

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

print(*result, sep='\n')
# Original solution
param_n = int(eval(input()))
params1 = list([int(x) for x in input().split(' ')])

for i in range(param_n):
    print((len(list([x for x in params1 if x == i + 1]))))

# Optimized solution
param_n = int(eval(input()))
params1 = list([int(x) for x in input().split(' ')])

result = [0 for i in range(param_n)]

for employee in params1:
    result[employee - 1] += 1

for num in result:
    print(num)
# 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 c in A:
    b[c-1]+=1

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

# Optimized solution
n=int(eval(input()))
li=list(map(int,input().split()))
check=[0]*n
for i in li:
  check[i-1]+=1
for i in range(n):
  print((check[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 b2 in b:
    print(b2)
# Original solution
import collections
N = int(eval(input()))
number = list(map(int,input().split()))
number = collections.Counter(number)
for i in range(1,N+1):
    if i in number:
        print((number[i]))
    else:
        print("0")


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

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


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

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

# 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 ans:
    print(i)
# Original solution
import sys
input = sys.stdin.readline
n = int(eval(input()))
a = list(map(int, input().split()))
for i in range(1, n):
    print((a.count(i)))
print((0))


# 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=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()))
buka=[0]*n
for i in a:
  buka[i-1]+=1

for b in buka:
  print(b)
# Original solution
def get_subordinate(n, members):

    for i in range(1, n+1):
        occur = members.count(i)
        print(occur)
        

if __name__ == '__main__':
    n = int(eval(input()))
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)



# Optimized solution
def get_subordinate(n, members):
    new_dict = {}

    for i in range(1, n+1):
        new_dict[i] = 0

    for member in members:
        if member in new_dict:
            new_dict[member] += 1

    print(*new_dict.values(), sep="\n")


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

for i in range(n):
    ans = a.count(i+1)
    print(ans)
    if ans > 0:
        a.remove(i+1)


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
a = sorted(a)
c = 1
count = 0
for i in a:
    if i == c:
        count += 1
    else:
        print(count)
        if i-c-1 > 0:
            for _ in range(i-c-1):
                print((0))
        c = i
        count = 1
print(count)
for _ in range(n-a[-1]):
    print((0))
# 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()))
ma = [0 for i in range(N)] 
for i in range(len(A)):
  ma[A[i]-1] += 1
for i in range(len(ma)):
  print((ma[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()))
A.sort(key=int)
l=0
for i in range(N):
    c=0
    while l < len(A) and A[l] == i+1:
        l+=1
        c+=1
    print(c)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

for i in range(1, n + 1):
    cnt = 0
    flg = False
    for j in a:
        if i == j:
            flg = True
            cnt += 1
        elif i != j and flg == True:
            break
    print(cnt)

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

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

[print(j) for j in res]
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
A  =sorted(A)
for i in range(1,N):
    k = A.count(i)
    print(k)
    A = A[k:N]

print((0))

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

def main():

    input = stdin.readline

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

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

    # for i in ans:
    #     print(i)

if __name__ == "__main__":
    main()

# Optimized solution
from sys import stdin

def main():

    input = stdin.readline

    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 ans:
        print(i)
    

if __name__ == "__main__":
    main()
# Original solution
from sys import stdin

def main():

    input = stdin.readline

    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 ans:
        print(i)
    

if __name__ == "__main__":
    main()

# Optimized solution
from sys import stdin

def main():

    input = stdin.readline

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

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

    print(('\n'.join(map(str,ans))))
    
if __name__ == "__main__":
    main()
# Original solution
from collections import Counter
N = int(eval(input()))
A = list(map(int, input().split()))
subordinates = [0] * N
boss_and_cnt = Counter(A)
for boss, cnt in list(boss_and_cnt.items()):
  subordinates[boss - 1] = cnt
for s in subordinates:
  print(s)

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

for i in range(1, n + 1):
    count = 0
    for b in boss:
        if b == str(i):
            count += 1
    print(count)

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


# Optimized solution
n=int(eval(input()))
li=list(map(int,input().split()))
ans=[0]*n
check=1
for i in range(len(li)):
    ans[li[i]-1]+=1
for i in range(len(ans)):
  print((ans[i]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
l = []
for i in range(1,N+1):
    l.append(A.count(i))
    print((l[i-1]))
    if sum(l)==N-1:
        break
num = N-len(l)
print((("0\n"*num).strip()))

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
l = []
for _ in range(N):
    l.append(0)
for i in A:
    l[i-1] +=1
for x in l:
    print(x)
# Original solution
# -*- coding: utf-8 -*-
# 整数の入力
a = int(eval(input()))
# # スペース区切りの整数の入力
# b, c = map(int, input().split())
# スペース区切りの整数の入力
strs = input().split()
zyousi = []
for s in strs:
    zyousi.append(int(s))

for i in range(a-1):
    buka_num = zyousi.count(i+1)
    # for j in range(i, a-1):
    #     # print(j)
    #     if i+1 == zyousi[j]:
    #         buka_num += 1
    print(buka_num)
print((0))

# Optimized solution
# -*- coding: utf-8 -*-
# 整数の入力
a = int(eval(input()))
# # スペース区切りの整数の入力
# b, c = map(int, input().split())
# スペース区切りの整数の入力
strs = input().split()

buka_nums = []
for i in range(a):
    buka_nums.append(0)

zyousi = []
for s in strs:
    zyousi_n = int(s)
    buka_nums[zyousi_n - 1] += 1

for i in buka_nums:
    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()))
lis = [0]*n
for i in range(n-1):
    lis[a[i]-1] += 1
for i in range(n):
    print((lis[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 A:
    ans[i-1] += 1
for j in ans:
    print(j)
# Original solution
N = int(eval(input()))

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

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()))
a = [0] * N

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

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

d = {}

for i in range(N - 1):
    if A[i] in d:
        d[A[i]].append(i + 2)
    else:
        d[A[i]] = [i + 2]

for i in range(1, N + 1):
    if i in d:
        print((len(d[i])))
    else:
        print((0))

# Optimized solution
N=int(eval(input()))
a=[int(i) for i in input().split()]
result=[0]*N
for i in a:
    result[i-1]+=1
for i  in range(N):
    print((result[i]))
# Original solution
#!/usr/bin/evn python3

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

cnt = 0

for i in range(1, N+1):
    if not A:
        break
    else:
        print((A.count(i)))
        A =[j for j in A if j != i]
    cnt += 1

print(('\n'.join(map(str, [0]*(N-cnt)))))

# Optimized solution
#!/usr/bin/env python3

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

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

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

if __name__ == "__main__":
  main()

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

if __name__ == "__main__":
  main()