function main(input) {
  var a = input.split("\n");
  a.sort(function(a, b) {
    return b - a
  });
  a.slice(0, 3).forEach(function(value) {
    console.log(value);
  });
}

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