#include <iostream>
using namespace std;

int main()
{
	int data[10];
	for (int i = 0; i < 10; ++i) {
		cin >> data[i];
	}
	int max[3] = { 0 };
	int n = 0, i = 0, temp;
	while (n < 3) {
		if (max[n] < data[i]) {
			max[n] = data[i];
			temp = i;
		}
		++i;
		if (i == 10) {
			data[temp] = 0;
			++n;
			i = 0;
		}
	}

	cout << max[0] << endl << max[1] << endl << max[2] << endl;
	
	return 0;
}