var one = 0, two = 0, three = 0;
var count = 0;
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
    var tmp = parseInt(chunk.toString().trim())
    if (tmp > one) {
        three = two;
        two = one;
        one = tmp;
    } else if (tmp > two) {
        three = two;
        two = tmp;
    } else if (tmp > three) {
        three = tmp;
    }
    if (++count == 10) {
        process.stdout.write(one + "\n" + two + "\n" + three);
        process.exit();
    }
});