#include <iostream> 
#include<cmath>
#include<iomanip>
using namespace std;  
int main()  
{  
    int x[10];
    int alter;
    int flag = 1;
    for(int i =0;i < 10;i++)
    {
    	cin>>x[i];
    	if(x[i] < 0 || x[i] > 10000)
		  break;	
	}
	while(flag == 1)
	{
		flag = 0;
		for(int i =0;i < 10;i++)
		{
			if(x[i - 1] > x[i])
			{
				alter = x[i];
				x[i] = x[i - 1];
				x[i - 1] = alter;
				flag = 1;
			}
		}
	}
	cout<<x[9]<<endl;
	cout<<x[8]<<endl;
	cout<<x[7]<<endl;
	return 0;
} 
