open Scanf
open Printf
let sort [a;b] = 
  if a < b then [a;b]
  else [b;a];;

let rec print_list a_list =
  match a_list with
    [] -> print_newline()
  | fst::rest -> printf "%d " fst;print_list rest;;

let make_list a b = [a;b];;

let read_two_nums () = sort @@ (scanf "%d %d\n" make_list);;

let rec loop () =
  match read_two_nums () with
    [0;0] -> ()
  | _list -> loop( print_list _list);;

loop();;