#include <iostream>
using namespace std;

int main() {
	int 1st, 2nd, 3rd;
	1st=0;
	2nd=0;
	3rd=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > 3rd){
			if(height of mountain i > 2nd){
				if(height of mountain i > 1st){
					1st=i;
				}else{
					2nd=i;
				}
			}else{
				3rd=i;
			}
		}
	}
	cout << 1st << endl;
	cout << 2nd << endl;
	cout << 3rd << endl;
	return 0;
}