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

int main()
{
    std::vector<int> numbers;
    for (int i = 0; i < 10; i++) {
        int value;
        std::cin >> value;
        numbers.push_back(value);
    }
    
    sort(numbers.begin(), numbers.end());

    std::vector<int>::reverse_iterator it = numbers.rbegin();
    std::cout << *it++ << std::endl;
    std::cout << *it++ << std::endl;
    std::cout << *it << std::endl;

    return 0;
}

