#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
int main(void)
{
    int a;
    vector<int> v;
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        v.push_back(a);
    }
    sort(v.begin(), v.end(), greater<int>());
    cout << v[0] << "\n";
    cout << v[1] << "\n";
    cout << v[2] << "\n";
}

