#include<stdio.h>

int main(void)
{
	int high[10]={0};
	int x,max1=0,max2=0,max3=0;

	for(x=0;x<10;x++)
	{
		scanf("%d",&high[x]);
	}

	for(x=0;x<10;x++)
	{
		if(max1<high[x])
		{
			max3=max2;
			max2=max1;
			max1=high[x];
		}
		else if(max2<high[x])
		{
			max3=max2;
			max2=high[x];
		}
		else if(max3<high[x])
		{
			max3=high[x];
		}
	}

	printf("%d\n%d\n%d\n",max1,max2,max3);
	return 0;
}