#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void)
{
  vector<int> a(10);
  for(int i=0;i<10;i++){
    cin >> a[i];
  }
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  /*
    ±êÍ
    sort(a.begin(),a.end(),greater<int>());
    ÆµÄàÇ¢
   */
  for(int i=0;i<3;i++){
    cout << a[i] << endl;
  }
}