var input = [];
var max;
var maxIndex;
var temp;
var maxLength = 3;
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on('data', function(chunk){
    input = chunk.toString("utf8").split("\n");
});
process.stdin.on('end', function(){
    for (var m = 0; m < maxLength; m++) {
        temp = 0;
        for (var i = 0; i < input.length; i++) {
            if (i === 0) {
                temp = input[i];
            }else{
                if (temp < input[i]) {
                    temp = input[i];
                    maxIndex = i;
                }
            }
        }
        input.splice(maxIndex, 1);
        console.log(temp)
    }
});