#include<iostream>
using namespace std;

int main() {

    int first = 0;
    int second = 0;
    int third = 0;
    int height;

    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 << second << endl << third << endl;
     
    return 0;
}