#include<iostream>
using namespace std;
 
int main(){
 
    int height[10];
    int TopOfThree[3];

    for(i = 0;i < 10;i++)
       cin >> height[i];

    for(int i = 0;i < 3;i++)
    {
        TopOfThree[i] = height[0];
        for(int j = 1;j < 10 - i;i++)
        {
             int index = 0;

             if(TopOfThree[i] < height[j])
             {
                  TopOfThree[i] = height[j];
                  index = j;
             }
        }

        for(int k = index;k < 10;k++)
        {
            if(k == 9)
              height[k] = 0;
           else
              height[k] = height[k + 1];
        }
     }

     cout << TopOfThree[0] << endl << TopOfThree[1] << endl << TopOfThree[2] << endl;

    return 0;
}