#include<iostream>
using namespace std;

int main()
{
    int* h = new int[10];

    for(int i=0; i<10; i++){
        cin >> h[i];
    }

    int max1=h[1], max2=h[2], max3=h[3];
    for(int j=0; j<9; j++){
        if(max1 <= h[j+1]){
            max1 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max2 <= h[j+1] && h[j+1] != max1){
            max2 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max3 <= h[j+1] && h[j+1] != max1 && h[j+1] != max2){
            max3 = h[j+1]; 
        }
    }

    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
}