fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(' ').map(String::toInt)
    val cities = IntArray(n)
    (1..m).forEach {
        readLine()!!.split(' ').forEach { cities[it.toInt() - 1]++ }
    }
    cities.forEach(::println)
}
