#include <iostream>

using namespace std;

int main () {
	int takasa[10];

	for (int i = 0; i < 10; i++) {
		cin >> takasa[i];
	}

	//????????????(?????¬????????§???????????????
	/*for (int i = 0; i < 9; i++) {
		for (int j = i+1; j < 10; j++) {
			if (takasa[i] < takasa[j])  {
				swap(takasa[i], takasa[j]);
			}
		}
    }*/

	sort(&takasa[0], &takasa[10]);

	for (int i = 0; i < 3; i++) {
		cout << takasa[9-i] << endl;
	}

	return 0;
}