import io.StdIn.readLine
object Main extends App {
  val Array(n, m) = readLine.split(" ").map(_.toInt)
  val (as, bs) = List.fill(m)(readLine.split(" ").map(_.toInt) match {
    case Array(a, b) => (a, b)
  }).unzip
  val rs = (as ++ bs).groupBy(identity)
  for (i <- 1 to n) println(rs(i).size)
}
