#include <iostream>

using namespace std;

int main()
{
	int i,moun,high[10000],j=0;
	for(i=0;i<10000;i++)
	{
		high[i] = 0;
	}
	for(i=0;i<10;i++)
	{
		cin >> moun;
		high[moun] = 1;
	}
	for(i=9999;i>=0;i--)
	{
		if(high[i] == 1)
		{
			cout << i << endl;
			j++;
		}
		if(j == 3)
		{
			break;
		}
	}
	return 0;
}