program ABC163_C
  integer,allocatable::A(:),B(:)
  read(*,*)N
  allocate(A(2:N),B(N-1))
  B=0
  read(*,*)A
  do i=1,N-1
     do j=2,N
        if(A(j)==i) B(i)=B(i)+1
     end do
     write(*,*)B(i)
  end do
  write(*,*)0
end program ABC163_C