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