module Main where

import Data.Functor

main :: IO ()
main = do
  { [x, y] <- getInts
  ; if x == 0 && y == 0 then done
    else do
      { case compare x y of
          LT -> putInts [x,y]
          GT -> putInts [y,x]
          EQ -> putInts [x,y]
      ; main
      }
  }

getInts :: IO [Int]
getInts = map read . words <$> getLine

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show

done :: IO ()
done = return ()