function Main(input){
    var h = input.split("\n").map(function(x){return parseInt(x,10)});
    h.sort(function(a,b){return b-a;});
    for(i = 0; i< 3; i++){
	console.log(h[i]);
    }
//console.log(h.slice(0,3).join("\n"));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));