var input = [];
var max;
var maxIndex;
var temp;
var maxLength;

process.stdin.on("data",function(chunk){
    input.push(chunk);
});
process.stdin.on("end", function(){
    for (var m = 0; m < maxLength.length; 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;
                }
            }
        }
            console.log(temp)
            input.splice(i,i);
    }
});