object Main extends App{

  	var list = List[Int]()
  	for (i <- 1 to 10) {
  		list = io.StdIn.readLine().toInt :: list
  	}

  	list = list.sorted.reverse

  	println(list(0) + "\n" + list(1) + "\n" + list(2))
}