var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var mountains = (input.trim()).split("\n").map(Number);
mountains.sort(sortNumber);

function sortNumber(a,b) {
    return b - a;
}

for (i=0; i!=3; i++) {
    console.log(mountains[i]);
}