#include <iostream>
using namespace std;
int main()
{
	int a, res[3] = {0}, i;
	for (i = 0; i < 10; i++)
	{
		cin >> a;
		if (a > res[0])
			res[2] = res[1], res[1] = res[0], res[0] = a;
		else if (a > res[1])
			res[2] = res[1], res[1] = a;
		else if (a > res[2])
			res[2] = a;
	}
	cout << res[0] << endl << res[1] << endl << res[2] << endl;
}