#include <iostream>
#include <algorithm>
#include <deque>
#include <functional>
using namespace std;
int main(){
	int num;
	deque<int> h;
	for(int i = 0; i < 10; i++){
		cin >> num;
		h.push_back(num);
	}
	sort(h.begin(), h.end(), greater<int>());
	deque<int>::iterator it = h.begin();
	while(it != h.begin()+3){
		cout << *it << endl;
		++it;
	}
	return(0);
}