import scala.io.StdIn

object Main extends App {
  val out = new java.io.PrintWriter(System.out)
  val Array(n, m) = StdIn.readLine.split(" ").map(_.toInt)
  val city = Array.ofDim[Int](n+1)
  Iterator.continually(StdIn.readLine)
    .take(m)
    .map(_.split(" "))
    .foreach(e => {
      city(e(0).toInt) += 1
      city(e(1).toInt) += 1
    })

  city.tail.foreach(r => out.println(r))
  out.flush
}