#include <iostream>
using namespace std;

int main()
{
	int mountains[10];
	int first = 0,second = 0,third = 0;

	for(int i=0;i<10;i++) {
		cin >> mountains[i];
		if(mountains[i]>first) {
			third = second;
			second = first;
			first = mountains[i];
		}
		else if(mountains[i]>second) {
			third = second;
			second = mountains[i];
		}
		else if(mountains[i]>third)
			third = mountains[i];
	}

	cout << first << endl << second << endl << third << endl;

	return 0;
}