#include<stdio.h>

int main(void){
	int i,j,k,x[10],highest,higher,high;
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	highest=0;
	higher=0;
	high=0;
	for(i=0;i<10;i++){
		if(x[i] >= highest){
		highest=x[i];
	}
	}
	for(j=0;j<10;j++){
		if(x[j]>=higher && highest > x[j]){
		higher=x[j];
	}
	}
	for(k=0;k<10;k++){
		if(x[k]>=high && highest > x[k] && higher > x[k]){
		high=x[k];
		}
	}
	printf("%d\n%d\n%d\n",highest,higher,high);
	
return 0;
}