import Control.Applicative
import Data.List

main = do
  [x,y] <- map read . words <$> getLine
  ordNum [x,y]

ordNum [x,y] = do
  if [x,y] == [0,0]
     then return()
     else do
       putStrLn $ unwords $ map show $ (sort :: [Int] -> [Int]) [x,y]
       [x2,y2] <- map read . words <$> getLine
       ordNum [x2,y2]