#include <bits/stdc++.h>
using namespace std;
int main(void){
    std::deque<int> deq;
    int a;
    for (int i=0;i<10;i++) {
        cin >> a;
        deq.emplace_back(a);
    }
    sort(deq.begin(),deq.end());
    cout << deq[deq.size()-1] << endl;
    cout << deq[deq.size()-2] << endl;
    cout << deq[deq.size()-3] << endl;
}

