#include <iostream>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
            cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);

        cout<<"Height of 1st mountain "<<a[2]<<endl;
        cout<<"Height of 2nd mountain "<<a[1]<<endl;
        cout<<"Height of 3rd mountain "<<a[0];
        return 0;
}
