#include <iostream>
#include <functional>
#include <list>
using namespace std;

//0001
int main(){
	list<int> height_list(10);

	for(int i=0; i<10; ++i){
		int height;
		cin >> height;
		height_list.push_back(height);
	}

	height_list.sort(greater<int>());
	list<int>::iterator ite = height_list.begin();
	for(int i=0; i<3; ++i){
		cout << *ite++ << endl;
	}
	return 0;

}