#include<stdio.h>
int main(void)
{
	int a, b, max, max2, max3;
	for (a = 1; a <= 10; a++) {
		scanf("%d",&b);
		if (b > max) {
			max = b;
		}
		else if (b > max2) {
			max2 = b;
		}
		else if (b > max3) {
			b = max3;
		}
		printf("%d\n %d\n %d\n ", max, max2, max3);
		return 0;
	}
}