#include<iostream>
#include<vector>
#include <algorithm>
using namespace std;

int main(){
    vector<int> takasa(10);
    for(int i = 0; i < 10 ; ++i){
        cin >> takasa.at(i);
    }
    std::sort(takasa.begin(),takasa.end());
    std::sort(takasa.begin(),takasa.end(),std::greater<int>());
    for(int i=0;i<3;++i){
        cout<<takasa.at(i)<<endl;
    }
}
