object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, M = sc.nextInt()
  val loads = List.fill(M)(sc.nextInt() -> sc.nextInt())
  val loadMap = loads.:::(loads.map(_.swap)).groupBy(_._1).view.mapValues(_.length)
  1.to(N).foreach(i => println(loadMap.getOrElse(i, 0)))
}
