import Control.Monad
import Control.Applicative

main = do
  [a, b] <- map (\x -> read x :: Int) . words <$> getLine
  when (not(a == 0 && b == 0)) $ do 
    putStrLn $ if a < b 
      then unwords $ map show [a, b]
      else unwords $ map show [b, a]
    main