#include <iostream>
#include <set>
using namespace std;
int main() {
    multiset<int> s;
    for (int i = 0; i < 10; ++i) {
        int h;
        cin >> h;
        s.insert(h);
    }
    int i = 0;
    for (auto iter = s.crbegin(); i < 3; ++iter) {
        cout << *iter << endl;
        ++i;
    }
    return 0;
}

