#include <stdio.h>

int main(){
	int i,j;
	int h1=0,h2=0,h3=0;
	
	for(i=1;i<=10;i++){
		scanf("%d\n",&j);
		if(j>=h1){
			h3=h2;
			h2=h1;
			h1=j;
		}
		else if(j>=h2){
			h3=h2;
			h2=j;
		}
		else if(j>=h3){
			h3=j;
		}
	}
	printf("%d\n%d\n%d\n",h1,h2,h3);
	return 0;
}