#include "stdio.h"
int main()
{
    int a,b,c,x,i;
    a=b=c=-1; i=10;
    while(i--){
        scanf("%d",&x);
        if(x>=a){
            c=b; b=a; a=x;
        }
        else if(x>=b){
            c=b; b=x;
        }
        else if(x>c)
            c=x;
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}