import Data.Functor( (<$>))
import Data.List( sort)
import Control.Monad( forM_)

main = do
    inputs <- takeWhile ("0 0"/=) . lines <$> getContents
    let
	processPerLine line = sort $ (read::String->Int) <$> (words line)
	putStrLn4itp0103c [small,big]
	  =
	    putStrLn $ (show small)++" "++(show big)

    forM_ inputs $
	    putStrLn4itp0103c . processPerLine

