#include <iostream>
#include <string>
#include <cstdlib>
#include <algorithm>

using namespace std;

int main(void) {
	int mh[10];
	string str;

	for (int i = 0; i < 10; i++) {
		getline(cin, str);
		mh[i] = atoi(str.c_str());
	}

	int s = sizeof(mh) / sizeof(int) - 1;
	sort(&mh[0], &mh[s]);

	for (int j = s; j > s - 3; j--) {
		cout << mh[j] << endl;
	}

	return 0;
}