#include <algorithm>
#include <deque>
#include <iostream>
#include <functional>

using namespace std;

int main()
{
	int i, num;
	deque<int> mountainheight;
	for ( i = 0; i < 10; i++ ) {
		scanf("%d",&num);
		mountainheight.push_back(num);
	}
	sort( mountainheight.begin(), mountainheight.end(), greater<int>() );

	deque<int>::iterator it = mountainheight.begin();
	for( i = 0; i < 3; i++ ) {
		cout << *it << endl;
		it++;
	}

	return 0;
}