function main(input) {
  var a = input.split("\n");
  a.sort(function(a, b) {
      if (a < b) return 1;
      if (a > b) return -1;
      return 0;
  });
  for (var i = 0; i < 3; i++) {
    console.log(a[i]);
  }
}

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