var heights = [];

process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', function (height) {
    height.trim().split('\n').forEach(function(line){
        heights.push(parseInt(line));
    });
});

process.stdin.on('end', function () {
    heights.sort(function(a, b){
        if(a > b){
            return -1;
        } else if (a == b){
            return 0;
        } else {
            return 1;
        }
    });
    for(var i = 0; i < 3; i++ ){
        console.log(heights[i]);
    };
});