import scala.io.StdIn.readInt

object Main{
  def main(args: Array[String]): Unit = {
    var a = new Array[Int](10)
    for(i <- 0 until 10) {
      a(i) = readInt
    }
    var s = a.sortWith(_ > _)
    for(i <- 0 until 3) {
      println(s(i))
    }
  }
}