object Main {
  def main(args: Array[String]) {

  	var mtHeightList: List[Int] = List()
  	var i = 0
  	while (i < 10) {
  		mtHeightList = mtHeightList :+ io.StdIn.readLine().toInt
  		i += 1
  	}

  	mtHeightList = mtHeightList.sorted

  	println(mtHeightList.head)
  	println(mtHeightList.tail.head)
  	println(mtHeightList.tail.tail.head)
  }
}