#include <iostream>
#include <algorithm>
using namespace std;

int Size = 10;

int main(void) {
    int height[Size] = {0};
    
    for(int i = 0; i < Size; ++i) {
        while(!(0 <= height[i] && height[i] <= 10000)) {
            cout << "No." << i + 1 << " : " << flush;
            cin >> height[i];
        }
    }
    sort(height, height + Size);
    
    cout << height[9] << endl
         << height[8] << endl
         << height[7] << endl;
}

