#include<iostream>
using namespace std;
int main(void){
  int high,max1=0,max2=0,max3=0;
  for(int i=1;i<=10;i++){
    cin >> high;
    if(high>max1){
      max3=max2;
      max2=max1;
      max1=high;
    }
    else if(max2<high && high<=max1){
      max3=max2;
      max2=high;
    }
    else if(max3<high && high<=max2){
      max3=high;
    }
  }
  cout << max1 << endl << max2 << endl << max3 << endl;
}

