#include <iostream>

using namespace std;

int main(int argc, char** argv)
{
        int height;
        int first = 0, second = 0, third = 0;
        for (int i = 0; i < 10; i++) {
                cin >> height;
                if (height > first) {
                        third = second;
                        second = first;
                        first = height;
                } else if (height > second) {
                        third = second;
                        second = height;
                } else if (height > third) {
                        third = height;
                }
        }
        cout << first << endl;
        cout << second << endl;
        cout << third << endl;

        return 0;
}