import Data.List (intersperse, sort)

sortNumTwo :: String -> String
sortNumTwo line =
  let sortedList = sort . map read . words $ line :: [Int]
  in concat . intersperse " " . map show $ sortedList

main = do
  line <- getLine
  let res = sortNumTwo $ line
  if res == "0 0" then return ()
  else do
    putStrLn res
    main