import Control.Monad
import Control.Applicative
readDigits = map read <$> words <$> getLine :: IO [Int]
main =
    loop
    where
    loop = do
        ns@[x,y] <- readDigits
        unless (x == 0 && y == 0) $ do
            putStrLn . unwords . map show $ sort ns
            loop