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

int main()
{
    vector<int> hills;
    for(int i = 0; i < 10; ++i) {
        int h;
        cin >> h;
        hills.push_back(h);
    }
    sort(hills.begin(), hills.end(), greater<int>());
    cout << hills[0] << endl;
    cout << hills[1] << endl;
    cout << hills[2] << endl;
    
    return 0;
}