#include<iostream>
using namespace std;

int main(){
	int tmp, a=0, b=0, c=0;
	for(int i=0;i<10;i++){
		cin>>tmp;
		if(tmp>a){
			c=b; b=a; a=tmp;
		}
		else if(tmp>b){
			c=b; b=tmp;
		}
		else if(tmp>c) c=tmp;
	}
	cout<<a<<endl<<b<<endl<<c<<endl;
	return 0;
}