#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
int main() {
    vector<int> h;
    int input;
    for (int i=0; i<10; ++i) {
        cin >> input;
        h.push_back(input);
    }

    partial_sort(h.begin(), h.begin()+3, h.end(), greater<int>());

    cout << h[0] << endl;
    cout << h[1] << endl;
    cout << h[2] << endl;
    return 0;
}