data class Bridge(val start: Int, val end: Int)

fun main(args: Array<String>) {
    val (n, m) = readLine()?.split(" ")?.map { it.toInt() } ?: return
    val bridges = (0 until m)
        .map {
            val (a, b) = readLine()?.split(" ")?.map { it.toInt() }!!
            Bridge(a, b)
        }

    val counter = mutableListOf<Int>().apply {
        for (i in 0 until n) add(0)
    }
    for (bridge in bridges) {
        counter[bridge.start - 1]++
        counter[bridge.end - 1]++
    }
    counter.withIndex().forEach { println("${it.value}") }
}