#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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