
import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val n, m = sc.nextInt()

  Range(0, m).map(_ => (sc.nextInt, sc.nextInt))
    .sorted
    .foldLeft(Array[Int](Range(0, n).map(_ => 0):_*)) {
      case (ar, (a, b)) =>
        ar(a - 1) = ar(a - 1) + 1
        ar(b - 1) = ar(b - 1) + 1
        ar
    }
    .foreach(println(_))
}
