#include<iostream>
using namespace std;
int h1,h2,h3,t;

int main()
{
    for(int i=0;i<10;i++)
    {
        cin >> t;
        if(t>h1){h3 = h2;h2=h1;h1=t;continue;}
        if(t>h2){h3=h2;h2=t;continue;}
        if(t>h3){h3=t;}
    }
    cout << h1 << endl;
    cout << h2 << endl;
    cout << h3 << endl;

    return 0;
}