import scala.io.StdIn._

object Main {
    def main(args: Array[String]): Unit = { 
        val seq: Seq[Int] = (0 until 10).map(_ => readInt()).sorted.reverse
        for(i <- 0 until 3) println(seq(i))
    }   
}