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

using namespace std;

int main(){
  int n = 10;
  vector<int> a;

  for(int i = 0; i < n; i++){
    int tmp;
    cin >> tmp;
    a.push_back(tmp);
  }

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

  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  
  return 0;
}