object Main extends App{
  var list = List[Int]()
  for(i <- 0 until 10){
    val m = io.StdIn.readLine().toInt
    list = m :: list
  }
  list = list.sorted(Ordering[Int].reverse)

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