import Control.Applicative

main :: IO ()
main = loop

loop :: IO ()
loop = do
  [x, y] <- fmap ( read :: String -> Int).words <$> getLine
  -- putStrLn $ show x ++ " " ++ show y
  if x == 0 && y == 0 
    then return ()
    else do 
      let ans = swap x y
      putStrLn ans
      loop
      

swap :: Int -> Int -> String
swap x y | x < y = show x ++ " " ++ show y
         | otherwise = show y ++ " " ++ show x
  