#include<iostream>
using namespace std;

int cmp(const void* a, const void* b);

int main() {
	int mt[10];
	for(int i=0; i<10; ++i) {
		cin >> mt[i];
	}

	qsort(mt, 10, sizeof(int), cmp);
	
	cout << mt[0] << endl
		 << mt[1] << endl
		 << mt[2] << endl;
		 
}

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