fun main() {
    val input = readLine()!!.split(" ").map { it.toInt() }
    val n = input[0]
    val m = input[1]

    val resultMap = HashMap<Int, Int>()
    for (i in (1..n)) {
        resultMap[i] = 0
    }

    for (i in 0 until m) {
        val ab = readLine()!!.split(" ").map { it.toInt() }
        resultMap[ab[0]] = resultMap[ab[0]]!! + 1
        resultMap[ab[1]] = resultMap[ab[1]]!! + 1
    }

    for (x in resultMap) {
        println(x.value)
    }
}