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