import scala.collection.mutable.ArrayBuffer

object Main extends App{
  val ary = ArrayBuffer[Int]()
  (1 to 10).foreach(i=> ary += io.StdIn.readInt)
  ary.sorted.reverse.slice(0,3).foreach(println)
}