function Main(input){
	var param = input.split("\n");
	var sorted = param.sort(function(x, y){return(y - x)});
	console.log(sorted.slice(0, 3).join("\n"));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));