import Control.Monad (replicateM)
import Data.List (sortBy)

main = do
    heights <- fmap (map read) $ replicateM 10 getLine :: IO [Int]
    mapM_ putStrLn $ map show $ take 3 $ sortBy (flip compare) heights 