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

int main()
{
    int heights[10];
    for(int i=0;i<10;i++)
    {
        cin>>heights[i];
    }
    sort(0,9);
    cout<<"height of 1st mountain "<<heights[9]<<endl;
    cout<<"height of 2nd mountain "<<heights[8]<<endl;
    cout<<"height of 3rd mountain "<<heights[7]<<endl;
    
    
}