#include <iostream>
using namespace std;
int mt[10];
int main()
{
    for (int i = 0; i < 10; i++)
        cin >> mt[i];
    for (int t = 1; t <= 3; t++)
    {
        int maxv = -1, mark = 0;
        for (int i = 0; i < 10; i++)
        {
            if (mt[i] > maxv)
            {
                maxv = mt[i];
                mark = i;
            }
        }
        cout << maxv << endl;
        mt[mark] = -100;
        maxv = -1;
        mark = 0;
    }
    return 0;
}