toInt x = read x :: Int
puts a b = putStrLn $ if a < b then  show a ++ " " ++ show b else show b ++ " " ++ show a

main = do
  s <- getLine
  let [a,b] = map toInt . words $ s
  if a == 0 && b == 0 then return ()
  else do
    puts a b
    main