#include<stdio.h>
int main()
{
    long long int  ansh[11],i,n,a=0,b=0,c=0;
    for(i=1;i<=10;i++){
        scanf("%lld",&ansh[i]);
        if(a<=ansh[i]){
            c=b;
            y=a;
            a=ansh[i];
        }
        else if(b<=ansh[i]){
            c=b;
            y=ansh[i];
        }
        else if(z<=ansh[i]){
            c=ansh[i];
        }
    }

    printf("%lld\n%lld\n%lld\n",a,b,c);

    return 0;
}