let swap() =
  let s = ref "" in
  let f a b = if a <= b then print_endline (string_of_int a ^ " " ^ string_of_int b)
                 else print_endline (string_of_int b ^ " "^ string_of_int a)
  in
  while (s := read_line() ; !s <> "0 0")
  do
    Scanf.sscanf !s "%d %d" f;
  done ;;
  swap () ;;
