import Data.List (sort)
exchange :: IO () 
exchange = do
  s <- getLine
  if s == "0 0" then return ()
  else do
    putStrLn $ unwords . map show . sort
               . map (read :: String -> Int) $ words s
    exchange

main = exchange