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

  // Converts it into array
  var mountains = input.split('\n');

  // Sorts the mountains
  mountains.sort(
    function(a,b){
        if( a > b ) return -1;
          if( a < b ) return 1;
          return 0;
      }
  );

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

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

}

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