#include <iostream>

using namespace std;

int main()
{
    int first, second, third;
    int tmp;
    
    first = second = third = 0;
    for (int i = 0; i < 10; i++) {
        cin >> tmp;
        if (tmp >= third) {
            if (tmp >= second) {
                if (tmp >= first) 
                    first = tmp;
                else
                    second = tmp;
            }
            else
                third = tmp;
        }
    }
    cout << first << '\n' << second << '\n' << third << '\n';

    return 0;
}