#include <stdio.h>

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