import scala.io.StdIn

object Main extends App {
  val Array(n, m)  = StdIn.readLine().split(" ").map(_.toInt)
  var r = Map[Int, Int]().withDefault( _ => 0)
  for(i <- 0 to m - 1){
    val ar = StdIn.readLine().split(" ")
    ar.foreach(e => r += e.toInt -> (r(e.toInt) + 1))
  }
  r.toSeq.sortBy(_._1).foreach(e => println(e._2))

}
