#include<stdio.h>

int main(){
	int rank[4];
	int M;
	int A,B;	
	rank[0]=rank[1]=rank[2]=0;
	for(A=0;A<10;A++){
		scanf("%d",&M);
		for(B=0;B<3;B++)
			if(rank[B]<M){
				rank[B+1]=rank[B];
				rank[B]=M;
				break;
			}
	}
	printf("%d\n%d\n%d\n",rank[0],rank[1],rank[2]);
	return 0;
}