import Control.Applicative
main = do
    answer <- (swap . map read . words) <$> getLine
    swappingTwoNumbers answer

swappingTwoNumbers :: String -> IO ()
swappingTwoNumbers "" = putStr ""
swappingTwoNumbers answer = do
    putStrLn answer
    next <- (swap . map read . words) <$> getLine
    swappingTwoNumbers next

swap :: [Int] -> String
swap [0, 0] = ""
swap [a, b] | a <= b = show(a) ++ " " ++ show(b)
            | otherwise = show(b) ++ " " ++ show(a)