#include <stdio.h>

int main(void)
{
	int m[10],out[3]={0,0,0};

	for(int i=0;i<10;i++) //???????????????
		scanf("%d",&m[i]);

	for(int i=0;i<10;i++){
		if(out[0]<=m[i]){
			out[2]=out[1];
			out[1]=out[0];
			out[0]=m[i];
		}else if(out[1]<=m[i]){
			out[2]=out[1];
			out[1]=m[i];
		}else if(out[2]<=m[i]){
			out[2]=m[i];
		}
	}

	for(int i=0;i<3;i++)
		printf("%d\n",out[i]);

	return 0;
}