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 _ = Array.(iter (fun (a, b) -> cs.(a) <- cs.(a) + 1; cs.(b) <- cs.(b) + 1) ab_s; iter (Printf.printf "%d\n") cs)