let _ =
  let rec p () =
    match read_line() with
     "0 0" -> ()
    | x -> Scanf.sscanf x "%d %d" (fun a b ->
      match a with
      | a when a < b -> Printf.printf "%d %d\n" a b
      | _ -> Printf.printf "%d %d\n" b a
    ); p ()
  in p ()

