object Main {
  def main(args: Array[String]): Unit = {
    val input: List[String] = io.Source.stdin.getLines.toList
    val tmp = input(0).split(' ').map(_.toInt)
    val n = tmp(0)
    val m = tmp(1)
    val c = Array.fill(n)(0)
    (1 to m).foreach(i => {
      val tmp = input(i).split(' ').map(_.toInt)
      c(tmp(0) - 1) += 1
      c(tmp(1) - 1) += 1
    })
    c.foreach(println(_))
  }
}
