function main(input) {
	input = input.split("\n");
	count = 0;
	arglength = input.length;
    outary = 0;

    for(count >= arglength){
    	outary = input[count];
    	input[count] = 0;
    	console.log(Math.max.apply(null, input));
    	input[count] = outary;
    	count = count + 1;
    	

    }

   

}
	

main(require('fs').readFileSync('/dev/stdin', 'utf8'));