#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	
	int n,a;
	vector<int>v;
	
	for(n=0;n<10;n++){
	cin>>a;
	v.push_back(a);
	}

	sort(v.begin(),v.end());
	cout << v[9] << endl << v[8] << endl << v[7] << endl;
	
}