
var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: {},
});

hs = [];

rl.on('line', function(h) {
    hs.push(h | 0);
});

rl.on('close', function() {
    hs.sort(function(p, q) { return p - q; });
    for(var i = 0; i < 3; ++i)
        console.log(hs[hs.length - i - 1]);
});