#include <bits/stdc++.h>

int main() {

    std::priority_queue<int, std::vector<int>, std::greater<int> > pq;
    std::stack<int> st;
    int tmp;
    for (int i = 0; i < 10; i++) {
        std::scanf("%d", &tmp);
        if (pq.size() == 3) {
            if (pq.top() < tmp) {
                pq.pop();
                pq.push(tmp);
            }
        }
        else {
            pq.push(tmp);
        }

    }

    while(!pq.empty()) {
        st.push(pq.top());
        pq.pop();
    }
    for (int i = 0; i < 3; i++) {
        std::cout << st.top() << std::endl;
        st.pop();
    }


    return 0;


}

