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

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

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

  // Takes the top three ones
  var topThreeMountains = input.slice(0, 3).join('\n');

  console.log(topThreeMountains);

}

main(data);