program main
      implicit none
      integer(4) :: n, i
      integer(4), allocatable :: a(:), b(:)

      read *, n
      allocate( a(2:n) )
      read *, a
      allocate( b(1:n) )

      b(:) = 0
      do i = 2, n
        b(a(i)) = b(a(i)) + 1 
      end do
      
      do i = 1, n
        print *, b(i)
      end do

end program main
