#include<string>
#include<vector>
#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
	int mountain[10];
	for (int i = 0; i < 10; i++)
	{
		cin>>mountain[i];
	}

	sort(mountain,mountain+10);
	cout<<mountain[9]<<endl;
	cout << mountain[8] << endl;
	cout << mountain[7] << endl;
	return false;
}
