#include <iostream>
#include <stdio.h> //printf()

using namespace std;

int main(){
    int i, A[10], tmp, j;

    for (i = 0; i < 10; i++)
        cin >> A[i];

    //bubble sort
    //??????????????????

    j = 3;
    while (j-- > 0) {
        for (i = 0; i < 9; i++) {
            if (A[i] > A[i+1]) {
                tmp = A[i+1];
                A[i+1] = A[i];
                A[i] = tmp;
            }
        }
    }

    printf("%d\n", A[9]);
    printf("%d\n", A[8]);
    printf("%d\n", A[7]);

    return 0;
}