main = do
  s <- getLine
  let toInt x = read x :: Int
  let puts a b = putStrLn $ a ++ " " ++ b
  let [a,b] = map toInt . words $ s
  if a == 0 && b == 0 then return ()
  else do
    if a < b then puts (show a) (show b) else puts (show b) (show a)
    main