#include <iostream>
#include <math.h>
using namespace std;

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