#include <iostream>
using namespace std;

int main()
{
	int top1 = 0, top2 = 0, top3 = 0;
	int temp;
	
	for (int i = 0; i < 10; i++) {
		cin >> temp;
		if (temp >= top1) {
			top3 = top2;
			top2 = top1;
			top1 = temp;
		} else if (temp >= top2) {
			top3 = top2;
			top2 = temp;
		} else if (temp >= top3) {
			top3 = temp;
		}
	}
	
	cout << top1 << "\n" << top2 << "\n" << top3 << "\n";
	return 0;
}