#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
    int height[10], i, height1 = 0, height2 = 0, height3 = 0;
    for (i = 0; i < 10; i++) {
        cin >> height[i];
        if (height1 < height[i]) {
            height1 = height[i];
        }
    }
    for (i = 0; i < 10; i++) {
        if (height2 < height[i] && height[i] != height1) {
            height2 = height[i];
        }
    }
    for (i = 0; i < 10; i++) {
        if (height3 < height[i] && height[i] != height1 && height2 != height[i]) {
            height3 = height[i];
        }
    }
    cout << height1 << endl;
    cout << height2 << endl;
    cout << height3 << endl;
    return 0;
}