object Main {
    def main(args:Array[String]) = {
        val sc = new java.util.Scanner(System.in)
        val list = List.fill(10)(sc.nextInt)
        val sorted_list = list.sorted.reverse
        for(i <- 0 to 2) println(sorted_list(i))
    }
}