open Batteries

let () =
  let n, m = Scanf.scanf " %d %d\n" (fun n m -> (n, m)) in
  let arr = Array.make n 0 in
  let () =
    1 -- m
    |> Enum.iter (fun _ ->
           Scanf.scanf " %d %d" (fun n m ->
               arr.(n - 1) <- arr.(n - 1) + 1 ;
               arr.(m - 1) <- arr.(m - 1) + 1 ) )
  in
  let () = Array.iter (fun x -> Printf.printf "%d\n" x) arr in
  ()
