#include<stdio.h>
void cal(){
int mark[10],h[10],i,r,high;
	for(i=0;i<10;i++){
		scanf("%d",h+i);
		mark[i]=0;
	}
	for(r=1;r<=3;r++){
		high=0;
		for(i=1;i<10;i++)if(h[i]>h[high]&&!mark[i])high=i;
		printf("%d\n",h[high]);
		mark[high]=1;
		}
}
int main(){
	cal();
	return 0;
}