#include <algorithm>
#include <iostream>
#include <vector>

int main() {
  std::vector<int> hills;
  int hight;
  for (int i = 0; i < 10; ++i) {
    std::cin >> hight;
    hills.push_back(hight);
  }
  std::sort(hills.begin(), hills.end(), std::greater<int>());
  for (int i = 0; i < 3; ++i) {
    std::cout << hills[i] << std::endl;
  }

  return 0;
}