import java.util.Scanner

object Main extends App {

    def input(i: Int): Unit = {
        if (i == 10) return
        mountains(i) = scanner.nextInt()
        input(i + 1)
    }

    def output(i: Int): Unit = {
        if (i == 3) return
        println(result(i))
        output(i + 1)
    }

    val scanner = new Scanner(System.in)
    val mountains = new Array[Int](10)
    input(0)
    val result = mountains.sortWith((a, b) => b < a)
    output(0)
}