let () =
  let n, m = Scanf.scanf "%d %d" (fun n m -> n, m) in
  let es = Array.init m (fun _ -> Scanf.scanf " %d %d" (fun a b -> a-1, b-1)) in
  Array.init n (fun i ->
    Array.map (fun (a, b) -> if i = a || i = b then 1 else 0) es |> Array.fold_left (+) 0)
  |> Array.iter (Printf.printf "%d\n")
