import Data.List

main = solve []

solve r = do
    str <- getLine
    let l = sort . map read $ words str
    if (all (==0) l) then
        mapM_ (putStrLn . unwords . map show) $ reverse r
    else
        solve (l:r)