let () =
  let rec aux u =
    let i = read_line () in
    let a,b = Scanf.sscanf i "%d %d" (fun a b ->  a,b) in
    if (a,b) = (0,0) then ()
    else aux (print_endline
                (if a > b then (Printf.sprintf "%d %d" b a)
                 else (Printf.sprintf "%d %d" a b)))
  in aux ()