#include <iostream>

using std::cin;
using std::cout;
using std::endl;

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

    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            if (heights[i] > heights[j]) {
                heights[10] = heights[i];
                heights[i] = heights[j];
                heights[j] = heights[10];
            }
        }
    }

    for (int i = 0; i < 3; ++i)
        cout << heights[i] << endl;
}


