program management
  implicit none
  integer :: n, a(200000) = -1, i, b(200000) = 0
  read(*,*) n
  read(*,*) a(2:n)
  do i = 2, n
    b(a(i)) = b(a(i))+1
  end do
  do i = 1, n
    write(*,'(i0)') b(i)
  end do
end program management