import Data.Functor ((<$>))
import Data.List (sort)

main :: IO ()
main = do
  cs <- takeWhile (/=[0,0]) . map (map read . words) . lines <$> getContents :: IO [[Int]]
  mapM_ (putStrLn . unwords . map show . sort) cs

