import java.util.Scanner
object Main{
    def main(args:Array[String]):Unit ={
        val scan = new Scanner(System.in)
        val list = for(i <- 1 to 10) yield scan.nextInt()
        val res = list.sorted.takeRight(3).reverse
        res.foreach(println _)
    }
}