
#include <iostream>

using namespace std;

int main()
{
	int first = 0;
	int second = 0;
	int third = 0;
	for (int i = 0; i < 10; ++i) {
		int input;
		cin >> input;
		if (first < input) {
			third = second;
			second = first;
			first = input;
			continue;
		}
		else if (second < input) {
			third = second;
			second = input;
			continue;
		}
		else if (third < input) {
			third = input;
		}
	}

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

	return 0;
}