program problemC
  implicit none

integer :: NMAX,n
integer, allocatable :: A(:), man(:)

read(*,*) NMAX

allocate(A(NMAX-1), man(NMAX))

read(*,*) A

man(:)=0

do n=1, NMAX-1
  man(A(n))=man(A(n))+1
end do

do n=1,NMAX
  write(*,*) man(n)
end do








deallocate(A,man)

end program
