#include <cstdio>
#include <iostream>

using namespace std;

int num[10];

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