program hello
implicit none


integer N,i,j
integer,allocatable,dimension(:)::A
integer,allocatable,dimension(:)::cont

read*,N
allocate(A(N-1),cont(N-1))
read*,A

do j = 1,N
 cont(j) = 0
end do

do i = 1,N
do j = 1,N
	if (A(i) == j) then 
    	cont(j) = cont(j) +1 
    endif
end do
end do

do i = 1,N
	write(*,*)cont(i)
end do

deallocate(N)
deallocate(A)

end program Hello
