fun main(arr:Array<String>) {
    val (n,m) = readLine()!!.split(" ").map { it.toInt() }
    val road = (1..m).map { readLine()!!.split(" ").map { it.toInt() - 1 } }
    val cnt = IntArray(n)
    road.forEach {
        cnt[it[0]]++
        cnt[it[1]]++
    }
    cnt.forEach { println(it) }
}

