import java.util.Scanner
fun main(args: Array<String>) {
    val (N,M) = readLine()!!.split(" ").map { it.toInt() }
    val ans = IntArray(N)
    repeat(M) { 
        val (a,b) = readLine()!!.split(" ").map { it.toInt() }.map { it.dec() }
        ans[a]++
        ans[b]++
    }
    ans.forEach { println(it) }
}