import scala.io.StdIn
 
object Main extends App {
  val Array(n, m)  = StdIn.readLine().split(" ").map(_.toInt)
  var r = Array.fill(n)(0)
 
  for(i <- 0 to m - 1){
    val ar = StdIn.readLine().split(" ").map(_.toInt)
    ar.foreach(e => r(e - 1) = r(e - 1) + 1)
  }
  r.foreach(println)
 
}