object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    val list = List.fill(10)(sc.nextInt) // nextInt???n????????°??????
    list.sorted.reverse match {
      case a1 :: a2 :: a3 :: any =>
        println(a1)
        println(a2)
        println(a3)
    }
  }
}