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

int main() {
  std::vector<int> heights;
  for (auto i =0; i < 10; i++) {
    int h;
    std::cin >> h;
    heights.push_back(h);
  }
  std::sort(heights.begin(), heights.end(), std::greater<int>());
  for (auto i =0; i < 3; i++) {
    std::cout << heights[i] << '\n';
  }
  return 0;
}