//
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

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