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

using namespace std;

int main(void) {
	vector<int> v;
	string str;

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

	sort(v.begin(), v.end());

	for (int j = v.size() - 1; j > v.size() - 4; j--) {
		cout << v[j] << endl;
	}

	return 0;
}