import Data.List

swapTwoNumbers :: IO ()
swapTwoNumbers = do
  input <- getLine
  let xs = map read $ words input
  if (head xs == 0) && (head (tail xs) == 0)
    then do return ()
    else do putStrLn $ unwords $ map show $ sort xs
            swapTwoNumbers

main :: IO ()
main = swapTwoNumbers