#include <stdio.h>

int main()
{
	int vc[10];
	int i;
	int max=0,sec=0,thi=0;

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

	printf("\n");
	for(i=0;i<10;i++){
		if(max <= vc[i])
			max = vc[i];
	}

	for(i=0;i<10;i++){
		if(sec <= vc[i] && vc[i] < max)
			sec = vc[i];
	}

	for(i=0;i<10;i++){
		if(thi <= vc[i] && vc[i] < sec)
			thi = vc[i];
	}

	printf("%d\n%d\n%d\n",max,sec,thi);

	return 0;
}