import scala.io.Source.stdin

object Main {
  def main(args: Array[String]) = {
    val it = for(i <- stdin.getLines()) yield i.toInt
    it.toList
      .sorted
      .reverse
      .slice(0,3)
      .foreach(println)
  }
}