#include <iostream>
using namespace std;

int main(){
	int mount[10];
	int i;
	for (i = 0; i < 10; i++) {
		cin >> mount[i];
	}
	int top = 0;
	int second = 0;
	int third = 0;

	for (i = 0; i < 10; i++) {
		if (third <= mount[i]){
			third = mount[i];
			if (second < mount[i]){
				third = second;
				if (top <= mount[i]){
					second = top;
					top = mount[i];
				}
				else
				{
					second = mount[i];
				}
			}
		}
	}

	cout << top << endl << second << endl << third << endl;
	cin >> i;
	return 0;
}