import scala.io.StdIn.readLine

object Main {
    def main(args: Array[String]): Unit = { 
        var seq: Seq[Int] = Seq()
        for(i <- 0 until 10) seq:+= readLine().toInt
        seq = seq.sorted(Ordering[Int].reverse)
        for(i <- 0 until 3) println(seq(i))
    }   
}