var yamataka;
var no1 = 0; //??°???????????????
var no2 = 0;
var no3 = 0;
var kotae;//???????????\??????

var fnSyutu = function(){
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
    var yamataka = chunk.toString().split('\n');//?????????????????´???split???????????????
    
    //number?????????
    for(i=0; i<yamataka.length; i++){
    yamataka[i] = parseInt(yamataka[i], 10);
    }
    
    //?????????????????????????????\??????
    for(i=0; i<yamataka.length; i++){
        if(yamataka[i] > no3 && yamataka[i] < no2 && yamataka[i] < no1)
            no3 = yamataka[i];
        else if(yamataka[i] > no3 && yamataka[i] > no2 && yamataka[i] < no1)
            no2 = yamataka[i];
        else if(yamataka[i] > no3 && yamataka[i] > no2 && yamataka[i] > no1)
            no1 = yamataka[i];
    }
    kotae = no1+"\n"+no2+"\n"+no3;
    console.log(kotae);
};
fnSyutu();