import Control.Applicative
import Data.List
import qualified Control.Monad as Monad

main :: IO ()
main = loopPutNumbers  

loopPutNumbers :: IO ()
loopPutNumbers = do
  [x,y] <- (map read).words <$> getLine
  Monad.when(x /= 0 || y /= 0) $ do
    putStrLn  $ if (x < y)
      then unwords $ show <$> [x,y]
      else unwords $ show <$> [y,x]
    loopPutNumbers
