#include<iostream>
using namespace std;

int main(){
	int i,j,iDate[10],hight[10];
	for(i=0;i<=9;++i){
		cin >> iDate[i];
		hight[i]=0;
	}
	for(i=0;i<=9;++i){
		for(j=0;j<=3;++j){
			if (iDate[i]>hight[j]){
				hight[j+2]=hight[j+1];
				hight[j+1]=hight[j];
				hight[j]=iDate[i];
				break;
			}
		}
	}
	for(i=0;i<=2;++i){
		cout << hight[i] << endl;
	}
	return 0;
}