#include <iostream>
#include <algorithm>

using namespace std;

int main(void) {
        int i;
        int height_of_mountain[10];

        for (i=0; i < 10; i++) {
                cin >> height_of_mountain[i];
        }

        sort(height_of_mountain, height_of_mountain+10);

        cout << height_of_mountain[9] << endl;
        cout << height_of_mountain[8] << endl;
        cout << height_of_mountain[7] << endl;

        return 0;
}