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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::string input;
        std::cin >> input;
        int height = std::stoi(input);
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}