#include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long UInt64;
typedef long long Int64;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

template<class _RanIt,class _Diff,class _Tmp> inline void _insertion_sort (_RanIt _Array,_Diff _Count,_Tmp)
{
	_Tmp tmp;
	for(_Diff i = 1; i < _Count; i++)
	{
		tmp = *(_Array + i);
		if( *(_Array + i - 1) > tmp)
		{
			_Diff j = i;
			do
			{
				*(_Array + j) = *(_Array + j - 1);
				j--;
			}while(j > 0 && *(_Array + j - 1) > tmp);
			*(_Array + j) = tmp;
		}
	}

}

template<class _RanIt,class _Diff,class _Tmp,class _Pr> inline void _insertion_sort (_RanIt _Array,_Diff _Count,_Tmp,_Pr _Pred)
{
	_Tmp tmp;
	for(_Diff i = 1; i < _Count; i++)
	{
		tmp = *(_Array + i);
		if( _Pred(*(_Array + i - 1) , tmp))
		{
			_Diff j = i;
			do
			{
				*(_Array + j) = *(_Array + j - 1);
				j--;
			}while(j > 0 && _Pred(*(_Array + j - 1) , tmp));
			*(_Array + j) = tmp;
		}
	}

}
	
template<class _RanIt> inline void insertion_sort(_RanIt _First,_RanIt _Last)
{
	_insertion_sort(_First,_Last - _First,*(_First));

}

template<class _RanIt,class _Pr> inline void insertion_sort(_RanIt _First,_RanIt _Last,_Pr _Pred)
{
	_insertion_sort(_First,_Last - _First,*(_First),_Pred);

}


//bubble_sort
template<class T> inline void myswap(T& a,T& b)
{
	T tmp;
	tmp = a;
	a = b;
	b = tmp;
}


template<class _RanIt,class _Diff> inline	void _bubble_sort (_RanIt _Array,_Diff _Count)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(_Array[j] < _Array[j-1])
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	
}

template<class _RanIt,class _Diff,class _Pr> inline void _bubble_sort (_RanIt _Array,_Diff _Count,_Pr Pred)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(Pred(_Array[j] , _Array[j-1]))
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	

}

template<class _RanIt> inline	void bubble_sort(_RanIt _First,_RanIt _Last)
{
	_bubble_sort(_First,_Last - _First);
}

template<class _RanIt,class _Pr> inline	void bubble_sort (_RanIt _First,_RanIt _Last, _Pr _Pred)
{
	_bubble_sort(_First,_Last - _First,_Pred);
}
	
int main()
{
	
	int a[10];
	rep(i,10) cin>>a[i];

	insertion_sort(a,a+10);


	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;

	return 0;
}