#include <map>
#include <string>
#include <iostream>
#include<vector>
#include <set>
#include<algorithm>

using namespace std;

int main()
{
	multiset<int, greater<int> > heights;
	int height;
	
	for (int i=0; i<10; i++)
	{
		cin >> height;
		heights.insert(height);
	}
	
	multiset<int>::iterator it = heights.begin();
	//while( it != heights.end() )
	for (int i=0; i<3; i++)
	{
		cout << *it << endl;
		++it;
	}
	
	
}