var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var data = (input.trim()).split('\n');

/**
 * Prints highest mountains
 */
function main(input) {

  // Sorts the data
  var sorted = input.sort(function(a,b){
      return b - a;
  });

  // Takes the top three ones
  var topThreeMountains = sorted.slice(0, 3);

  // Loops through the top three
  for (var i = 0; i < topThreeMountains.length; i++) {
    console.log(topThreeMountains[i]);
  }

}

main(data);