#include<iostream>
using namespace std;

int main(){
    int first=0,second=0,third=0,now;

    for (int i=1;i<11;i++){
        cin >> now;
        if(now>first){
            third=second;
            second=first;
            first=now;
        }
        else if(now>second){
            third=second;
            second=now;
        }
        else if(now>third) third=now;
    }

    cout << first <<"\n";
    cout << second <<"\n";
    cout << third <<"\n";
    return 0;
}