#include <cstdio>

int main()
{
        unsigned int hill[10];

        for (int i = 0; i < 10; i++) {
                scanf("%u", &hill[i]);
        }
        for (int i = 0; i < 3; i++) {
                for (int j = 9; j > i; j--) {
                        if (hill[j - 1] < hill[j]) {
                                unsigned int tmp = hill[j - 1];
                                hill[j - 1] = hill[j];
                                hill[j] = tmp;
                        }
                }
        }
        for (int i = 0; i < 3; i++) {
                printf("%u\n", hill[i]);
        }

        return 0;
}