
object MainKt {
  @JvmStatic fun main(args:Array<String>) {
    val (N,M) = readLine()!!.split(" ").map(String::toInt)
    val connection= (1..M).map {
      val(a,b)=readLine()!!.split(" ").map(String::toInt)
      Pair(a,b)
    }
  
    (1..N).map {
    
        connection.filter { pair->
          val (a,b)=pair
          a==it || b==it
        }.size
    }.forEach(::println)

  }
}