/**
  * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001
  * List of Top 3 Hills
  */
object Main {
  def main(args: Array[String]): Unit = {
    Iterator.continually(io.StdIn.readLine()).takeWhile(_ != null).take(10).map(_.toInt).toSeq
      .sorted(Ordering[Int].reverse)
      .take(3)
      .foreach(println)
  }
}