#include <iostream>
#include <queue>
#include <vector>
#include <stack>



int main()
{
    int a, b, c;
    std::priority_queue<int, std::vector<int>, std::greater<int>> pq;
    int height, third;
    for (int i = 0; i < 10; i++) {
        //scanf("%d", &height);
        std::cin >> height;
        if (i < 3) {
            pq.push(height);
        } else {
            third = pq.top(); pq.pop();
            if (third < height) pq.push(height);
            else pq.push(third);
        }
    }

    c = pq.top(); pq.pop();
    b = pq.top(); pq.pop();
    a = pq.top(); pq.pop();

    std::cout << a << std::endl;
    std::cout << b << std::endl;
    std::cout << c << std::endl;

    return 0;
}
