#include <algorithm>
#include <iostream>
#include <list>
using namespace std;

int main(int argc, char const *argv[]) {
  int input_num = 10;

  list<int> ls;

  int height = 0;
  for (size_t i = 0; i < input_num; i++) {
    cin >> height;
    ls.push_back(height);
  }

  ls.sort(std::greater<int>());

  list<int>::iterator it = ls.begin();
  for (int i = 0; i < 3; i++) {
    cout << *it << endl;
    it++;
  }

  return 0;
}

