import Control.Monad
import Data.List

main :: IO ()
main = replicateM 10 getLine >>= putStrLn . ans

ans :: [String] -> String
ans s = init . unlines . take 3 . map show . reverse . sort $ readInts s


readInts :: [String] -> [Int]
readInts ss = map read ss

