program abc163c
   implicit none
   integer :: N, i, j, count
   integer, allocatable :: A(:), numOfBuka(:)


   read(*,*) N
   allocate(A(N), numOfBuka(N))
   A(:) = 0
   numOfBuka(:) = 0
   read(*,*) A(2:N)

   do i = 1, N
      numOfBuka(A(i)) = numOfBuka(A(i)) + 1 
   end do

   do i = 1, N
      print *, numOfBuka(i)
   end do

end program abc163c
