import Control.Applicative

main = do xs <- (map read) . concatMap words . lines <$> getContents
          putStr . unlines $ solve xs

solve :: [Int] -> [String]
solve (x:y:xs) | x==0 && y==0 = []
               | x<=y = ((show x) ++ " " ++ (show y)) : solve xs
               | x>y = ((show y) ++ " " ++ (show x)) : solve xs