#include <iostream>
using namespace std;

int main()
{
	int h[10] = {}, i = 0, n[3] = {};
	while (cin >> h[i++]) {
		if (h[i] > h[n[0]]) {
			n[2] = n[1];
			n[1] = n[0];
			n[0] = i;
		}
		else if (h[i] > h[n[1]]) {
			n[2] = n[1];
			n[1] = i;
		}
		else if (h[i] > h[n[2]]) {
			n[2] = i;
		}
	}
	for (int j = 0; j < 3; j++) {
		cout << h[j + 1] << endl;
	}
    return 0;
}