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