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

using namespace std;

void Top3Mountains(int m[10])
{
			deque<int> mountains;
			if ( m[0] >= 0 && m[0] <= 10000 )mountains.push_back(m[0]);
			if ( m[1] >= 0 && m[1] <= 10000 )mountains.push_back(m[1]);
			if ( m[2] >= 0 && m[2] <= 10000 )mountains.push_back(m[2]);
			if ( m[3] >= 0 && m[3] <= 10000 )mountains.push_back(m[3]);
			if ( m[4] >= 0 && m[4] <= 10000 )mountains.push_back(m[4]);
			if ( m[5] >= 0 && m[5] <= 10000 )mountains.push_back(m[5]);
			if ( m[6] >= 0 && m[6] <= 10000 )mountains.push_back(m[6]);
			if ( m[7] >= 0 && m[7] <= 10000 )mountains.push_back(m[7]);
			if ( m[8] >= 0 && m[8] <= 10000 )mountains.push_back(m[8]);
			if ( m[9] >= 0 && m[9] <= 10000 )mountains.push_back(m[9]);

			sort(mountains.begin(),mountains.end(),greater<int>());

			deque<int>::iterator it = mountains.begin();

			int i=0;
			for(i=0;i<3; i++){
				cout << *it << endl;
				it++;
			}
	
}

int main()
{
	int m[10] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};

	Top3Mountains(m);
	return 0;
}