#include <iostream>
#include <stdio.h>

int A[11];

int main() {
    for (int i = 0; i < 10; i++) {
        scanf("%d", &A[i]);
    }
    for (int i = 0; i < 3; i++) {
        int max_val = A[i];
        for (int j = i+1; j < 10; j++) {
            if (max_val < A[j]) std::swap(max_val, A[j]);
        }
        A[i] = max_val;
    }
    for (int i = 0; i < 3; i++) {
        printf("%d\n", A[i]);
    }
    return 0;
}

