import Control.Applicative
import Control.Monad
import Data.Function

c a b = if a < b then (a,b) else (b,a)

main :: IO ()
main = do
    fix $ \loop -> do
        [a,b] <- map read . words <$> getLine
        unless ([a,b] == [0,0]) $ do
            let r = c a b
            putStrLn $ (show $ fst r) ++ " " ++ (show $ snd r)
            loop
