fun main(args: Array<String>) {
    abc061b()
}

fun abc061b() {
    val (n, m) = readLine()!!.split(" ").map { it.toInt() }
    val ab = (1..m).map { readLine()!!.split(" ").map { it.toInt() } }
        .flatten()

    val count = (1..n).map { num -> ab.count { it == num } }
        .joinToString(separator = System.lineSeparator())

    println(count)
}
