
exception Error of string
let err s = raise (Error s)

let rec solve () =
    let x, y = Scanf.scanf "%d %d " (fun x y -> x, y) in
    if x != 0 || y != 0 then (
        if x < y then
            Printf.printf "%d %d\n" x y
        else
            Printf.printf "%d %d\n" y x;
        solve ()
    )

let _ = solve ()
