program ABC061B
    implicit none
    integer(8)::N,M,a,b,i,j,out
    integer(8),allocatable,dimension(:,:)::G
    read(5,*)N,M
    allocate(G(N,N))
    G=0

    do i=1,M
        read(5,*)a,b
        G(b,a)=G(b,a)+1
        G(a,b)=G(a,b)+1
    end do

    do i=1,N
        out=0
        do j=1,N
            out=out+G(j,i)
        end do
        print'(i0)',out
    end do        
end program ABC061B