module Main where

import Control.Applicative
import Text.Printf

main :: IO ()
main = loop 

loop :: IO()
loop = do
  { [x,y]<- getInts
  ; if x == 0 && y == 0 then return ()
    else do
      {putInts(if x > y then [y,x] else [x,y])
      ; loop
      }
  }

--

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

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


