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

using namespace std;

void Top3Mountains(int m1,int m2,int m3,int m4,int m5,int m6,int m7,int m8,int m9, int m10)
{
			deque<int> mountains;
			if ( m1 >= 0 && m1 <= 10000 )mountains.push_back(m1);
			if ( m2 >= 0 && m2 <= 10000 )mountains.push_back(m2);
			if ( m3 >= 0 && m3 <= 10000 )mountains.push_back(m3);
			if ( m4 >= 0 && m4 <= 10000 )mountains.push_back(m4);
			if ( m5 >= 0 && m5 <= 10000 )mountains.push_back(m5);
			if ( m6 >= 0 && m6 <= 10000 )mountains.push_back(m6);
			if ( m7 >= 0 && m7 <= 10000 )mountains.push_back(m7);
			if ( m8 >= 0 && m8 <= 10000 )mountains.push_back(m8);
			if ( m9 >= 0 && m9 <= 10000 )mountains.push_back(m9);
			if ( m10 >= 0 && 10 <= 10000 )mountains.push_back(m10);

			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()
{

	Top3Mountains(1819,2003,876,2840,1723,1673,3776,2848,1592,922);
	return 0;
}