#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;

int comparefunc(const void *a,const void *b)
{
    return(*(int*)b - *(int*)a);
}

int main()
{
    int height[10],i;
     while(1!=EOF){
        for(i=0;i<10;i++){
            scanf("%d",&height[i]);
        }
        qsort(height,10,sizeof(int),comparefunc);

        for(i=0;i<3;i++){
            printf("%d\n",height[i]);
        }
     }
     return 0;
}