#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> yama(10);
    for(int i=0;i<10;i++){
        cin >> yama[i];
    }
    sort(yama.begin(),yama.end());
    cout << yama[9] << "\n" << yama[8] << "\n" << yama[7] << "\n";
}