import scala.io.Source.stdin

object Main {
  def main(args: Array[String]) = {
    val it = for(i <- stdin.getLines()) yield i.toInt
    val list = it.toList.sorted(Ordering[Int].reverse)

    for(i <- 0 to 2)
      println(list(i))
  }
}