import Data.List import Data.Char main = interact $ foldl1 (++) . reverse . sort . map read . map (\c -> show $ digitToInt c)