#include<iostream>
using namespace std;

int main() {
	int first = 0;
	int second = 0;
	int third = 0;

	for (int i = 0; i < 10; i++) {
		int num;

		cin >> num;

		if (first <= num) {
			third = second;
			second = first;
			first = num;
		}
		else if ((second <= num) && (num < first)) {
			third = second;
			second = num;
		}
		else if ((third <= num) && (num < second)) {
			third = num;
		}
		else {
			//???????????????
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;

	return 0;
}