#include <iostream>

int main(int argc, const char *argv[]) {
    int top1 = 0, top2 = 0, top3 = 0;
    for (int i = 0, h; i < 10 && std::cin >> h; i++) {
        if (h >= top1) {
            top3 = top2;
            top2 = top1;
            top1 = h;
        } else if (h >= top2) {
            top3 = top2;
            top2 = h;
        } else if (h >= top3) {
            top3 = h;
        }
    }
    std::cout << top1 << std::endl << top2 << std::endl << top3 << std::endl;
    return 0;
}