#include <stdio.h>
#include <math.h>

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	int i,rec;
	int high[3]={0,0,0};
	
	for(i=0;i<10;i++){
		scanf("%d",&rec);
		if(rec>=high[0]){
			high[2]=high[1];
			high[1]=high[0];
			high[0]=rec;
		}else if(rec>=high[1]){
			high[2]=high[1];
			high[1]=rec;
		}else if(rec>=high[2]){
			high[2]=rec;
		}
	}
	
	for(i=0;i<3;i++){
		printf("%d\n",high[i]);
	}
	
	return 0;
}