object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val array = List.fill(10)(sc.nextInt())

    val sorted = array.sortBy(-_)

    (0 to 2).foreach { i => println (sorted(i))}
  }
}