program main
  implicit none
  integer :: m, n, i, a, b
  integer, allocatable :: cnt(:)
  read(*, *) n, m
  allocate(cnt(n))
  cnt(:) = 0
  do i = 1, m
    read(*, *) a, b
    cnt(a) = cnt(a) + 1
    cnt(b) = cnt(b) + 1
  end do
  do i = 1, n
    write(*, "(i0)") cnt(i)
  end do
end program main
