#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

int main() {

  int input;
  vector<int> yama;

  for ( int i = 0; i < 10; i++ ) {
    cin >> input;
    yama.push_back(input);
  }

  sort( yama.begin(), yama.end(), greater<int>() );

  cout << yama[0] << endl << yama[1] << endl << yama[2] << endl;

  return 0;

}