import scala.io.StdIn._
 
object Main {
    def main(args: Array[String]): Unit = { 
        val seq: Seq[Int] = (0 until 10).map(_ => readInt()).sorted.reverse.slice(0, 3).foreach(println)
    }   
}