#include<iostream>
using namespace std;
int main(){
	int a[10],i,j,highest=0,higher=0,higher2=0;
	for(i=0;i<10;i++){
		cin>>a[i];
	}
	for(i=0;i<10;i++){
		if(a[i]>highest){
			highest=a[i];
		}
	}
	cout<<highest<<endl;
	for(j=0;j<10;j++){
		if(highest==a[j]){
			a[j]=0;
			break;
		}
	}
	for(i=0;i<10;i++){
		if(a[i]>higher2){
			higher2=a[i];
		}
	}
	cout<<higher2<<endl;
	for(j=0;j<10;j++){
		if(higher2==a[j]){
			a[j]=0;
			break;
		}
	}
	for(i=0;i<10;i++){
		if(a[i]>higher){
			higher=a[i];
		}
	}
	cout<<higher<<endl;
}