
#include<bits/stdc++.h>
#include<limits.h>
using namespace std;
int main()
{
   int i,j,k=0,ar[100],first,second,third;
   first=INT_MIN;
   second=INT_MIN;
   third=INT_MIN;

   for(i=0;i<10;i++)
   {
     cin>>ar[i];
   }
   for(i=0;i<10;i++)
   {
     if(ar[i]>first)
     {
       third=second;
       second=first;
       first=ar[i];
     }
     else if(ar[i]>second){
      third=second;
      second=ar[i];
     }
     else if(ar[i]>third)
     {
       third=ar[i];
     }
   }
   cout<<first<<endl;
   cout<<second<<endl;
   cout<<third<<endl;



    return 0;
}

