#include<stdio.h>
int main()
{
    int a[10];
    int z=0,y=0,x=0;
    int i;
    for(i=1;i<=10;i++){
        scanf("%d",&a[i]);
        if(x<a[i]){
            z=y;
            y=x;
            x=a[i];
        }
        else if(y<a[i]){
            z=y;
            y=a[i];
        }
        else if(z<a[i]){
            z=a[i];
        }
    }
    printf("%d\n%d\n%d",x,y,z);
    return 0;
}