(function(stdin) {
  var mountains = stdin.trim().split('\n').map(Number);
  mountains.sort(function(a, b) {
    return b - a;
  });
  console.log(mountains.slice(0, 3).join('\n'));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));