#include<iostream>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
   vector<int>l;
   int a;
   for(int i=0;i<10;i++)

   {
       cin>>a;
       l.push_back(a);
   }
   sort(l.begin(),l.end());
   cout<<l[9]<<endl;
   cout<<l[8]<<endl;
   cout<<l[7]<<endl;
   return 0;
}