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

using namespace std;

int main(){
  vector<int> v;
  for(int i = 0; i < 10; i++){
    int b;
    cin >> b;
    v.push_back(b);
  }
  sort(v.begin(), v.end(), greater<int>());
  cout << v[0] << endl << v[1] << endl << v[2] << endl;
}