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

int main()
{
  int hs[10];
  for(int i=0; i<10; i++){
    cin >> hs[i];
  }
  sort(hs, hs + 10);
  cout << hs[9] << endl;
  cout << hs[8] << endl;
  cout << hs[7] << endl;
}