var readline = require('readline');
var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});

var hills = [];
rl.on('line', function(line) {
    hills.push(parseInt(line.trim()));
}).on('close', function() {
    var top3 = hills.sort(function(a, b) {
        return a - b;
    }).reverse().slice(0, 3);
    for (i=0; i<top3.length; i++) {
        console.log(top3[i]);
    }
});