// Please run with node.js
// $ node p1.js < input.txt
// tested on node version 0.10.36
var inputText = "";

process.stdin.setEncoding('utf8');
process.stdin.on('readable', function() {
  var chunk = process.stdin.read();
  if (chunk !== null) {
      inputText += chunk;
  }
});

process.stdin.on('end', function() {
    var numbers = inputText.split("\n").filter(function(f) { return f.length }).map(Number);
    //console.log(numbers);
    numbers = numbers.sort()
    numbers = numbers.reverse();
    console.log(numbers[0]);
    console.log(numbers[1]);
    console.log(numbers[2]);
});