#include<iostream>
using namespace std;

int N;

int main(){
	N = 10;
	int t;
	int mh[N];
	
	for(int i=0; i<10; i++){
		cout << "height of mountain " << i+1 << " : ";
		cin >> t;
		if(t>=0 && t<=10000)
			mh[i]=t;
		else{
			i=i-1;
			cout << "over!\n";
		}
	}
	
	for(int i=0; i<10; i++){
		for(int j=i+1; j<10; j++){
			if(mh[i] < mh[j]){
				t = mh[i];
				mh[i] = mh[j];
				mh[j] = t;
			}
		}
	}
	
	cout << "----------------------\n";
	
	for(int i=0; i<3; i++)
		cout << "height of the " << i+1 << " mountain: " << mh[i] << "\n";
	
	return 0;
}