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

int main(){
   vector<int> v;
   v.clear();
   int a;
   
   for(int i=0; i<10; i++){
      cin >> a;
      v.push_back(a);
   }
   
   sort(v.begin(), v.end());
   
   cout << v[9] << endl; 
   cout << v[8] << endl;
   cout << v[7] << endl;
  
   return 0;
}