# In peace, in love, in war, everything is the same



import math



deg = [0] * 200005

n=int(eval(input()))

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



for i in range(n-1):

    deg[ar[i]] = deg[ar[i]] + 1



for i in range(1, n+1, 1):

    print((deg[i]))
if __name__ == "__main__":

    tcase = int(eval(input()))

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

    leng = len(pcase) + 1

    items = [0]*leng

    for i in pcase:

        items[i-1] +=1

    for i in items:

        print(i)
# In peace, in love, in war, everything is the same
import math

deg = [0] * 200005
n = int(eval(input()))
ar = list(map(int, input().split()))
for i in range(n - 1):
    deg[ar[i]] = deg[ar[i]] + 1
for i in range(1, n + 1, 1):
    print((deg[i]))

if __name__ == "__main__":
    tcase = int(eval(input()))
    pcase = [int(i) for i in input().split(" ")]
    leng = len(pcase) + 1
    items = [0] * leng
    for i in pcase:
        items[i - 1] += 1
    for i in items:
        print(i)

-# In peace, in love, in war, everything is the same -import math - -deg = [0] * 200005 -n = int(eval(input())) -ar = list(map(int, input().split())) -for i in range(n - 1): -    deg[ar[i]] = deg[ar[i]] + 1 -for i in range(1, n + 1, 1): -    print((deg[i])) +if __name__ == "__main__": +    tcase = int(eval(input())) +    pcase = [int(i) for i in input().split(" ")] +    leng = len(pcase) + 1 +    items = [0] * leng +    for i in pcase: +        items[i - 1] += 1 +    for i in items: +        print(i)