#include <iostream>
using namespace std;
int main()
{
	int arr[10];
	int max1 , max2 , max3;
	int i;
	for ( i = 0 ; i < 10 ; i++)
		cin >> arr[i];
	max1 = arr[0];
	for ( i = 0 ; i < 10 ; i++)
	{
		if ( max1 < arr[i])
		{
			max3 = max2;
			max2 = max1;
			max1 = arr[i];
		}
		else if ( max2 < arr[i])
		{
			max3 = max2 ;
			max2 = arr[i];
		}
		else if ( max3 < arr[i])
		{
			max3 = arr[i];
		}
	}
	cout << max1 << endl << max2 << endl << max3 << endl ;
	return 0;
}