import scala.io.Source.stdin

object Main {
  def topHillsCheck(l: List[Int], n: Int): List[Int] = l.sortWith(_>_).take(n)

  def main(args: Array[String]): Unit = {
    val hillsList = stdin.getLines.toList.map(_.toInt)
    val topNum = 3
    topHillsCheck(hillsList, topNum).foreach(println)
  }
}