#include<stdio.h>
int main(void){
        int point[20],count=0,putCount=0,Ans=0,PMAX,i,Delete;
        point[0]=0;
        printf("--入力--\n");
        while(count<=9){
                scanf(" %d",&point[count]);
                count++;
                }
        count--;
        PMAX=count;
        printf("\n--出力--\n");
        while(count>0){
                for(i=0; i<=PMAX; i++){
                        if(point[i]>=Ans){
                                Ans=point[i];
                                Delete=i;
                                }
                        }
                point[Delete]=0;
                if(putCount<3){
                printf("        %d\n",Ans);
                putCount++;
                }
                Ans=0;
                count--;
                }
        return 0;
}