-- | Main entry point to the application.
module Main where
 
import Control.Applicative
import Control.Monad
import Data.List
import Debug.Trace
import Text.Printf
import Data.Array

-- | The main entry point.
main :: IO ()
main = do
    ns <- concatMap (fmap (read :: String -> Int) . words) . lines <$> getContents
    -- let ns = [5,3,1,3,4,3]
    let topthree = take 3 $ reverse $ sort ns
    forM_ [0..2] $ \i -> do
      putStrLn $ show $ topthree !! i