import Data.List(sort)

main :: IO ()
main = interact (unlines . map sortIntListStr . takeWhile (/="0 0") . lines)

sortIntListStr :: String -> String
sortIntListStr = unwords . map show . sort . strToIntList

strToIntList :: String -> [Int]
strToIntList = map read . words