#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int A[10];
       
    for (int i=1; i<=10; i++)
    {
        cout << "height of mountain " << i;
        cin >> A[i];
    }
    
    sort (A, A+10);
    reverse(A, A+10);
    
    for (int e=1; e<=3; e++)
    {
        cout << "height of the" << e << "st mountain" << A[e] << endl;
    }

    return 0; 
}