import Control.Applicative
import Control.Monad
import Data.List
import Text.Printf

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

main :: IO ()
main = do
  [x, y] <- sort <$> readInts
  when (y > 0) $ do
    printf "%d %d\n" x y
    main

