(* swapping two numbers *)
open Scanf
open Printf

(* `a->`b->list *)
let sort lst = 
  match lst with
    [a;b] -> if a<b then [a;b] else [b;a]
  | _ -> [];;

(* list->() *)
let rec print_list a_list =
  match a_list with
    [] -> print_newline()
  | fst::rest -> printf "%d " fst;print_list rest;;
(* `a->`b->list *)
let make_list a b = [a;b];;
(* () -> list *)
let read_two_nums () = sort @@ (scanf "%d %d\n" make_list);;
(* main *)
let rec loop () =
  match read_two_nums () with
    [0;0] -> ()
  | _list -> loop( print_list _list);;

loop();;
print_newline();;