#include <iostream>
using namespace std;

int main(){
  int h,first,second,third;
  first = second = third = -1;
  for(int i=0;i<10;i++){
     cin >> h;
     if(third < h)third = h;
     if(second < third){
       int tmp = second; second = third; third = tmp;
     }
     if(first < second){
       int tmp = first; first = second; second = tmp;
     } 
  }
  cout << first << endl << second << endl << third << endl;
}