#include<iostream>
using namespace std;

int main(){
    int first,second,third;
    int number;
    
    first=0;
    second=0;
    third=0;
    
    for(int i=0;i<10;i++){
        cin >> number;
        if(number>first){
            third=second;
            second=first;
            first=number;
        }
        else if(number>second){
            third=second;
            second=number;
        }
        else if(number>third){
            third=number;
        }
    }
    
    cout << first << endl << second << endl << third << endl;

    return 0;
}
