program main
  implicit none
  integer :: N
  integer,allocatable :: A(:)
  integer,allocatable :: out(:)
  integer :: i
  read(*,*) N
  allocate(A(N))
  read(*,*) A(2:)
  allocate(out(N))
  out(:) = 0
  do i = 2,N
     out(A(i)) = out(A(i)) + 1
  end do
  do i = 1,N
     write(*,'(i0)') out(i)
  end do
end program main
