 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;

 int main()
 {
   int first,second,third;
   first=second=third=0;
   int N;
   while(cin>>N)
   {
     if(first<N) first=N;
     else if(second<N) second=N;
     else if(third<N) third=N;                 
   }
   cout<<first<<endl;
   cout<<second<<endl;
   cout<<third<<endl;
   //while(1);      
   return 0;    
 }
 
 
 