import Foundation

extension String {
    var argi: [Int] { return self.characters.split(" ").map { Int(String($0))! } }
}

let inp = readLine()!.argi

let n = inp[0]
let m = inp[1]

var res = [Int]()
for _ in 0..<n
{
    res.append(0)
}

for _ in 0..<m {
    let inp = readLine()!.argi
    let a = inp[0] - 1
    let b = inp[1] - 1

    res[a] += 1
    res[b] += 1
}

for i in 0..<n {
    print(res[i])
}

