import Data.List.Split
import Data.List

main = do
    -- a <- readFile "in"
    a <- getContents
    let aa = splitOn "\n" a
    let cc = map (\x -> if length x == 1 then "0" else x) aa
    let dd = tail $ reverse cc
    let bb = map read dd :: [Int]
    let tt = reverse $ sort bb

    putStrLn $ show $ head tt
    putStrLn $ show $ head $ tail tt
    putStrLn $ show $ head $ tail $ tail tt

    return ()


