let () =
  let rec swap () =
    let a,b = Scanf.sscanf (read_line()) "%d %d" (fun a b -> if a < b then a,b else b,a) in
    if a != 0 || b != 0 then
      begin
        print_int a;
        print_string " ";
        print_int b;
        print_string "\n";
        swap ()
      end
  in
  swap ()
;;
