#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main()
{
	vector<int> v;
	int n;
	for (int i = 0; i < 10; i++) {
		cin >> n;
		v.push_back(n);
	}
	sort(v.begin(), v.end());

	for (int i = 0; i < 3; i++) {
		cout << v.back() << endl;
		v.pop_back();
	}
	return 0;
}