import Control.Applicative
import Control.Monad
import Data.List
sentaku :: Ord a => [a] -> Maybe (a, [a])
sentaku [] = Nothing
sentaku xs = Just (y, ys)
  where
    y  = maximum xs
    ys = delete y xs

sentakuSort :: Ord a => [a] -> [a]
sentakuSort xs = unfoldr sentaku xs

main = do
  xs <- map read . words <$> getLine
  putStrLn $ unwords . map show . sentakuSort $ (xs :: [Int])
