import Control.Applicative
import Data.List

main = do 
	xs <- map (sort . toIntList) . takeWhile (/= "0 0") . lines <$> getContents
	mapM putStrLn $ map showAnswer xs

toIntList :: String -> [Integer]
toIntList = map read . words

showAnswer :: [Integer] -> String
showAnswer (x:y:_) = (show x) ++ " " ++ (show y)
