#include<iostream>
#include<cstdio>

using namespace std;

int main(){
  int i,j;
  int no1=0, no2=0, no3 = 0;
  int cur=0;
  for(i=0; i<10; i++){
    cin>>cur;
    if(cur>=no1){
      no3= no2;
      no2= no1;
      no1 = cur;
    }else if(cur>=no2){
      no3= no2;
      no2= cur;
    }else if(cur>=no3){
      no3= cur;
    }
  }
  cout << no1 << endl;
  cout << no2 << endl;
  cout << no3 << endl;

    return 0;
}