#include <iostream>
#include <set>
using namespace std;

int main() {
	multiset<int, greater<int>> ms; int temp;
	for (int i = 0; i < 10; i++) { cin >> temp; ms.insert(temp); }
	auto itr_e = ms.begin();
	for (int i = 0; i < 3; ++i) ++itr_e;
	for (auto itr_s = ms.begin(); itr_s != itr_e; ++itr_s) {
		cout << *itr_s << endl;
	}
	return 0;
}
