#include<iostream>
using namespace std;

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

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

    int tmp;
    for(int j=0; j<9; j++){
        for(int k=0; k<9; k++){
         if(h[k] < h[k+1]){
                tmp = h[k];
                h[k] = h[k+1];
                h[k+1] = tmp;
            }
        }
    }

    cout << h[0] << endl;
    cout << h[1] << endl;
    cout << h[2] << endl;
}