import Control.Monad
import Control.Applicative
import System.IO
import Data.List

main = do
  inputs <- getContents
  let xs = read <$> lines inputs :: [Int]
  let three = go xs
  mapM putStrLn $ show <$> three

go :: [Int] -> [Int]
go xs = let
  ys = sort xs
  in take 3 $ reverse ys 