object Main{
  def main(args: Array[String]){
    val in = new java.util.Scanner(System.in)

    var list = List[Int]()
    for(i <- 0 to 9){
      list = in.nextInt :: list
    }

    list.sortWith((s, t) => s < t)
    println(list(0)+"\n"+list(1)+"\n"+list(2))

  }
}