// Please run with node.js
// $ node p1.js < input.txt
// tested on node version 0.10.36
var fs = require("fs");
var input = fs.readFileSync('/dev/stdin').toString();
var numbers = input.split("\n").map(Number);
numbers = numbers.sort(function(a, b) { return b - a });
for(var i = 0; i < 3; i++) {
    if(i < numbers.length) {
        console.log(numbers[i]);
    }
}