#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	vector<int> heights;
	for (int i = 0; i < 10; ++i) {
		int h;
		cin >> h;
		heights.push_back(h);
	}

	sort(heights.begin(), heights.end(), std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		cout << heights[i] << "\n";
	}
    return 0;
}