#include<stdio.h>

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