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

using namespace std;

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