object Main {
       def main(args: Array[String]) = {
           var in = new java.util.Scanner(System.in)
           var arr = new Array[Int](10)
           for(i<-0 until 10) {
                    arr(i) = in.nextInt 
           }
           arr = arr.sorted.reverse
           for(i<-0 to 2) {
                    println(arr(i))
           }
       }
}