#include <iostream>

using namespace std;

int main()
{
    int a, max1, max2, max3;
     max1 = max2 = max3 = INT_MIN;
   while(cin >> a)
   {
       if(a > max3)
       {
           max3 = a;
           if(a > max1)
           {
               max3 = max2;
               max2 = max1;
               max1 = a;

           }
           else if( a > max2)
           {
               max3 = max2;
               max2 = a;
           }
       }

   } cout << max1 << endl << max2 << endl << max3 <<endl;

    return 0;
}


