function Main(input){
    var h = input.split("\n");
    h.sort(function(a,b){return Number(b)-Number(a);});
    console.log(h.slice(0,3).join("\n"));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));