import java.util.Scanner

objectMain {
  def main(args : Array[String]) = {
    val scanner = new Scanner(System.in)
    var list = List.empty[Int]

    for(i <- 1 to 10){
      list = scanner.nextLine().toInt :: list
    }

    list
      .sorted
      .reverse
      .take(3)
      .foreach(println(_))
  }
}