import Control.Applicative
import qualified Control.Monad as Monad

main = loopPutNumbers

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