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

int main(){
	int height[10];
    for (int i = 0; i < 10; i++)
		cin >> height[i];
	sort(height, height + 10);
	cout << height[7] << '\n';
	cout << height[8] << '\n';
	cout << height[9] << '\n';
    return 0;
}