#include <iostream>
#include <algorithm>

using namespace std;

const int SIZE = 10;

int main()
{
    int intArray[SIZE]; //= {5, 3, 32, -1, 1, 104, 53, 23 , 34, 90};
    for(int i=0;i<SIZE;i++)
    {
        cin>>intArray[i];
    }
    //Now we call the sort function
    sort(intArray, intArray + SIZE);

    cout<<"height of 1st mountain "<<intArray[9]<<endl;
    cout<<"height of 2nd mountain "<<intArray[8]<<endl;
    cout<<"height of 3rd mountain "<<intArray[7]<<endl;


    return 0;
}