#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    vector<int> container;

    string buff;
    for(int i = 0; i < 10; ++i){
        getline(cin, buff);
        stringstream ss;
        ss << buff;

        int height = 0;
        ss >> height;

        container.push_back(height);
    }

    sort(
         container.begin(),
         container.end(),
         [](int n1, int n2) -> bool {
            return (n1 > n2);
         }
    );

    for(int i = 0; i < 3; ++i)
        cout << container[i] << endl;

    return 0;
}

