#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
	vector<int> mountain;
	for(int i = 0;i < 10;i++){
		int x = 0;
		cin >> x;
		mountain.push_back(x);
	}
	sort(mountain.begin(),mountain.end(),greater<int>());
	vector<int>::iterator it = mountain.begin();
	cout << *it << endl;
	it++;
	cout << *it << endl;
	it++;
	cout << *it << endl;

	return 0;
}