#include <iostream>
using namespace std;
int main(){
	int h[10],one=0,two=0,three=0;
	for(int i=0;i<10;i++){
		cin>>h[i];
		if(three<h[i]){
			if(two<=h[i]){
				if(one<=h[i]){
					three=two;
					two=one;
					one=h[i];
				}else{
					three=two;
					two=h[i];
				}
			}else{
				three=h[i];
			}
		}
	}
	cout<<one<<endl<<two<<endl<<three<<endl;
	return 0;
}