#include <stdio.h>

int main(void)
{
	int i, j;
	int hills[10];
	int temp;

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

	for (i = 0; i < 9; i++){
		for (j = 0; j < 9 - i; j++){
			if (hills[j] > hills[j + 1]){
				temp = hills[j];
				hills[j] = hills[j + 1];
				hills[j + 1] = temp;
			}
		}
	}

	printf("%d\n", hills[9]);
	printf("%d\n", hills[8]);
	printf("%d\n", hills[7]);

	return (0);
}