#include <iostream>
using namespace std;

int main()
{
	int h1 = 0, h2 = 0, h3 = 0;
	int hdata[10];
	for (int n = 0; n < 10; n++) {
		cin >> hdata[n];
		if (hdata[n] > h1)
			h1 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h2 && h1 != hdata[n])
			h2 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h3 && h1 != hdata[n] && h2 != hdata[n])
			h3 = hdata[n];
	}

	cout << h1 << endl << h2 << endl << h3 << endl;
}