import Control.Monad
import Control.Applicative

solver :: Int -> Int -> String
solver a b
  | a < b = show a ++ " " ++ show b
  | otherwise = show b ++ " " ++ show a

main :: IO()
main = do
  (a:b:_) <- map (read :: String -> Int) . words <$> getLine
  unless (a == 0 && b == 0) $
    do putStrLn $ solver a b
       main