let counting_sort a n k =
  let b = Array.make n 0 in
  let c = Array.make (k + 1) 0 in
  Array.iter (fun e -> c.(e) <- c.(e) + 1) a;
  for i = 1 to k do c.(i) <- c.(i) + c.(i-1) done;
  for i = n - 1 downto 0 do
    c.(a.(i)) <- c.(a.(i)) - 1;
    b.(c.(a.(i))) <- a.(i);
  done;
  b

let () =
  let n = read_int () in
  let a = Array.make n 0 in
  for i = 0 to n - 1 do
    a.(i) <- Scanf.scanf "%d " (fun i -> i);
  done;
  counting_sort a n 10000
  |> Array.iteri (fun i e -> Printf.printf (if i = 0 then "%d" else " %d") e);
  print_newline ()