let n, m = Scanf.scanf " %d %d" @@ fun a b -> a, b
let ab_s = Array.init m @@ fun _ -> Scanf.scanf " %d %d" @@ fun a b -> a - 1, b - 1
let cs = Array.make n 0
let f i = cs.(i) <- cs.(i) + 1
let _ = Array.iter (fun (a, b) -> f a; f b) ab_s; Array.iter (fun c -> Printf.printf "%d\n" c) cs