let () =
  let counting_sort a b k =
    let len = (Array.length a) -1 and
        c = Array.make (k+1) 0 in
    for i = 0 to len do
       c.(a.(i)) <- c.(a.(i))+1
    done;
    for i = 1 to k do
      c.(i) <- c.(i) + c.(i-1)
    done;
    for i = 0 to len do
      let j = len - i in
      b.(c.(a.(j))-1) <- a.(j);
      c.(a.(j)) <- c.(a.(j))-1
    done;
    b
  in
  let _ = read_int () and
      line = read_line () |> Str.split (Str.regexp " ")
             |> List.map int_of_string
             |> Array.of_list
  in
  let l = counting_sort line (Array.make (Array.length line) 0) 10000 in
  Printf.printf "%s\n" (Array.map string_of_int l |> Array.to_list |> String.concat " ")
;;