#include<stdio.h>
#define N 10

int main()
{
    int i, j, n, a=0;
    int A[N];

    for(i=0;i<10;i++){
        scanf("%d", &n);
        A[i] = n;
    }   
    for(i=0;i<3;i++){
        n = A[i];
        for(j=i+1;j<N;j++){
            if(n<A[j]){
                n = A[j];
                a = j;//max_index
            }   
        }   
        n = A[i];
        A[i] = A[a];
        A[a] = n;
        printf("%d\n",A[i]);
    }   
    return 0;
}