#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int a[10],i;
    cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>a[7]>>a[8]>>a[9];
    for(i=0;i<10;i++){
        cin>>a[i];
    }
    sort(a,a+10);
    cout<<a[9]<<endl;
    cout<<a[8]<<endl;
    cout<<a[7]<<endl;
       return 0;
}