#include<stdio.h>
#include<string.h>

main(void){
    int num[10], i, high1 = 0, high2 = 0, high3 = 0;
    
    for( i = 0; i < 10; i++){
        scanf("%d", &num[i]);
        if( num[i] >= high1){
            high3 = high2;
            high2 = high1;
            high1 = num[i];
        }else if( num[i] >= high2){
            high3 = high2;
            high2 = num[i];
        }else if(num[i] >= high3){
            high3 = num[i];
        }
    }
    
    printf("%d\n%d\n%d\n", high1, high2, high3);

    return 0;
}