let format s =
  Str.split (Str.regexp " ") s |>
  List.map int_of_string |>
  List.sort (-) |>
  List.map string_of_int |>
  String.concat " "

let rec loop () =
  match read_line () with
  | "0 0" -> ()
  | line -> loop (print_endline (format line))

let () = loop ()