#include<stdio.h>

int main(){
    int i;
    int input;
    int height[10], tmp[10];
    for (int i = 0; i < 10; i++){
        scanf("%d", &input);
        height[i] = input;
    }

    int max1 = 0, max2 = 0, max3 = 0;
    for(i = 0; i <= 10; i++){
        if (height[i] > max1)
            max1 = height[i];
    }

    for(i = 0; i <= 10; i++){
        if (max1> height[i] > max2)
            max2 = height[i];
    }

    for(i = 0; i <= 10; i++){
        if (max2 > height[i] > max3)
            max3 = height[i];
    }

    printf("%d\n", max1);
    printf("%d\n", max2);
    printf("%d\n", max3);

    return 0;
}