#include <bits/stdc++.h>
#include <iostream>

using namespace std;

int main()
{
    int height[10];
    int n = sizeof(height)/sizeof(height[0]);
    for(int x = 1; x <= 10; x++){
        cin >> height[x];//input
        if (height[x] > 10000 || height[x] < 0){
            cin >> height[x];
        }
        else{};
    }
    cout << endl;
    sort(height, height+n,greater<int>());
    cout << height[0] << endl;
    cout << height[1] << endl;
    cout << height[2] << endl;
    return 0;
}
