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

int main(){

	int i;
	int height[10];

	for (i = 0; i < 10; i++){
		do{
			cin >> height[i];
		} while (height[i] < 0 || height[i] > 10000);
	}

	sort(height, height + 10, greater<int>());

	for (i = 0; i < 3; i++){
		cout << height[i] << "\n";
	}

	return 0;
}