#include <iostream>
#include <set>

using namespace std;

int main(void){
	int count = 0;
	int arr[10];
	cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5] >> arr[6] >> arr[7] >> arr[8] >> arr[9];
	set<int, greater<int> > nums;
	for (int i=0; i<10; ++i){
		nums.insert(arr[i]);
	}
	set<int, greater<int> >::iterator it = nums.begin();
	int n = 0;
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
		++n;
	}

	return 0;
}