program main
    implicit none
    integer(8) N, i
    integer(8), allocatable :: A(:), boss(:)
    read *, N
    allocate(A(N))
    allocate(boss(N - 1))
    read *, boss
    do i = 1, N - 1
        A(boss(i)) = A(boss(i)) + 1
    end do
    do i = 1, N
        print '(I0)', A(i)
    end do
    stop
contains

end program main