import Control.Monad

qsort :: [Int] -> [Int]
qsort [] = []
qsort (p:xs) = qsort lt ++ [p] ++ qsort gt
  where lt = [l | l <- xs, l < p]
        gt = [g | g <- xs, g >= p]

solver :: [Int] -> [Int]
solver xs =
  let sorted = qsort xs
      revSort = reverse sorted
  in
      take 3 revSort

main ::IO()
main = do
  input <- replicateM 10 getLine
  mapM_ print $ solver $ map read input