#include <iostream>
#include <set>
using namespace std;

int main() {
	
	typedef std::multiset<int> MySet;
	MySet heightSet;
	
	for(int i = 0; i < 10; ++i)
	{
		int val;
		cin >> val;
		heightSet.insert(val);
	}
	
	MySet::reverse_iterator rit = heightSet.rbegin();
	for(int i = 0; i < 3; ++i)
	{
		cout << *rit << endl;
		++rit;
	}
	
	return 0;
}