#include <iostream>

using namespace std;

void swap(int &x1, int &x2)
{
	int tmp = x1;
	x1 = x2;
	x2 = tmp;
}

int main()
{
	int h1, h2, h3;
	h1 = h2 = h3 = 0;

	for (int i = 0; i < 10; i++) {
		int x;
		cin >> x;
		if (x > h3) {
			swap(x, h3);
			if (h3 > h2) {
				swap(h3, h2);
				if (h2 > h1) {
					swap(h2, h1);
				}
			}
		}
	}
	cout << h1 << endl;
	cout << h2 << endl;
	cout << h3 << endl;
	return 0;
}