import Data.List
import Control.Applicative

main :: IO()
main = do
    putStr =<< 
        (unlines . map show . take 3 . reverse . sort . map (read :: String -> Int) . lines)
            <$> getContents