#include<iostream>
#include<queue>
using namespace std;
int main()
{
    int big,meter,i=1;
    priority_queue<int>mountain;
    for(i=0;i<10;i++)
    {
        cin>>meter;
        mountain.push(meter);
    }
        cout<<mountain.top()<<"\n";
        mountain.pop();
        cout<<mountain.top()<<"\n";
        mountain.pop();
        cout<<mountain.top()<<"\n";
        mountain.pop();
    return 0;
}