import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val Array(n, m) = in.readLine().split("\\s+").map(_.toInt)

    val cities = Array.ofDim[Int](n)

    for(_ <- 0 until m) {
      val Array(a, b) = in.readLine().split("\\s+").map(_.toInt)
      cities(a - 1) += 1
      cities(b - 1) += 1
    }

    for(i <- 0 until n) {
      out.println(cities(i))
    }

    out.flush()
  }
}
