#include<iostream>
#include<functional>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{ 
	int temp;
	vector<int>a;
	for(int i=0;i<10;i++){
		cin >> temp;
		a.push_back(temp);
	}
	sort(a.begin(),a.end());
	cout << a[9] << endl << a[8] << endl << a[7] << endl;
	return 0;
}