let () =
  let n, m = Scanf.scanf "%d %d\n" (fun n m -> n, m) in
  let roads = Array.make n 0 in
  for i = 1 to m do
    Scanf.scanf "%d %d\n" (fun a b ->
      roads.(a - 1) <- roads.(a - 1) + 1;
      roads.(b - 1) <- roads.(b - 1) + 1)
  done;
  Array.iter (Printf.printf "%d\n") roads
