#include <iostream>
#include <set>

int main() {
	using namespace std;
	set<int> setHom;

	for (int i = 0; i < 10; ++i) {
		int iHom;
		cin >> iHom;
		setHom.insert(iHom);
	}

	set<int>::reverse_iterator rit = setHom.rbegin();
	for (int i = 0; i < 3; ++i, ++rit) {
		cout << *rit << endl;
	}

	return 0;
}