fun main(args: Array<String>) {
    val (N, M) = readLine()!!.split(" ").map(String::toInt)
    val roads = Array(M) { readLine()!!.split(" ").map(String::toInt).let { Pair(it[0], it[1]) } }
    val map = IntArray(N)
    roads.forEach {
        map[it.first - 1]++
        map[it.second - 1]++
    }
    map.forEach(::println)

}

