program atcoder322_D
  integer,dimension(200000) :: A
  integer :: B
  read(5,*)N
  B=0
  read(5,*)A(1:N)
  do K=1,N
     C=A(K)
     A(K)=0
     do I=1,N-1
        do J=I+1,N
           if(A(J)==A(I)) B=B+1
        end do
     end do
     A(K)=C
     write(6,*)B
     B=0
  end do
end program atcoder322_D