#include <iostream>
#include <array>

int main()
{
    int first = 0;
    int second = 0;
    int third = 0;
    std::array<int, 10> arr;

    for (int i = 0; i < 10; i++) {
        std::cin >> arr.at(i);
        if (arr.at(i) >= first) {
            third = second;
            second = first;
            first = arr.at(i);
        } else if (arr.at(i) >= second) {
            third = second;
            second = arr.at(i);
        } else if (arr.at(i) >= third) {
            third = arr.at(i);
        }
    }

    std::cout << first << std::endl
              << second << std::endl
              << third << std::endl;
    return 0;
}