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

int main() {
  
  char a[256];
  int mountain[9] = {};
  int lineCount = 0,n,t,j,temp;
  
  for(n=0;n<10;n++) {
    cin.getline(a,256);
    mountain[n] = stoi(a);
    //cout << mountain[n];
  }

  for(t=0; t<10; t++)
  {
    for(j=t; j< 9; j++)
    {
      if(mountain[t] < mountain[j+1] )
      {
        temp= mountain[t];
        mountain[t]= mountain[j+1];
        mountain[j+1]= temp;
      }
    }
  }
  
  for (int i=0; i<3; i++) {
    cout << mountain[i]<< endl;
  }
  
  return 0;
}