#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>

using namespace std;

int main() {
    vector<int> h(10);
    for (size_t i=0; i<10; ++i)
        scanf("%d", &h[i]);

    sort(h.begin(), h.end(), greater<int>());
    for (size_t i=0; i<3; ++i)
        printf("%d\n", h[i]);

    return 0;
}