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

int main(){
	vector<int> v(3,0);
	int s;
	for(int i = 0; i < 10; i++){
		sort(v.begin(),v.end());
		cin >> s;
		if(v[0] < s){
			v[0] = s;
		}
	}

	sort(v.begin(),v.end());
	for(int i = 0; i < 3; i++){
		cout << v[2-i] << endl;
	}

}