#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>

int main() {
    return []() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            }
        })();
        sort( list.rbegin(), list.rend() );
        for_each(
            list.begin(),
            list.begin() + 3,
            [](int x){ std::cout << x << std::endl; }
        );
        return 0;
    }();
}