#include <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

int num[10];

int cmp(const void *a, const void *b) {
	return *(int *)b - *(int *)a; 
}

int main() {
	while (scanf("%d", &num[0]) != EOF) {
		for (int i=1; i<10; ++i) scanf ("%d", &num[i]);
		qsort(num, 10, sizeof(int), cmp);
		printf ("%d\n%d\n%d\n", num[0], num[1], num[2]);
	}
	return 0;
}