 #include<iostream>
 #include<fstream>

 using namespace std;

 int main(){

     ifstream ifs("in1.txt");

     int i;
     int height[3]={};
     int tmp, tmp2;
     string str;

     while(getline(ifs,str)){
         sscanf(str.c_str(),"%d",&tmp);
         if(0<=tmp && tmp <=10000){
             for(i=0;i<3;i++){
                 if(height[i] < tmp){
                     tmp2 = height[i];
                     height[i] = tmp;
                     tmp = tmp2;
                 }
             }
         }
     }

     for(i=0;i<3;i++){
         cout << height[i] << endl;
     }

     return 0;
 }