#include <cstdio>
int main(){
    int input;
    int i;
    //scanf("%d",&input);
    int first=0,second=0,third=0;
    for(i=0;i<10;++i){
        scanf("%d",&input);
        if(input>first){
            third=second;
            second=first;
            first=input;
        }
        else if(input>second){
            third=second;
            second=input;
        }
        else if(input>third){
            third=input;
        }
    }
    printf("%d\n%d\n%d\n",first,second,third);
    return 0;
}