object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datN, datM) = readLine.split(" ").map(_.toInt)
    val data = for(i <- 1 to datM) yield (readLine.split(" ").map(_.toInt))
    (1 to datN).foreach (i =>
      println( data.flatten.filter(_ == i).length )
    )
  }
}
