#include<iostream>
using namespace std;

int main () {
    int f;
    f = 0;
    int s;
    s = 0;
    int t;
    t = 0;
    for (int i=0;i<10;++i){
        int a;
        cin >> a;
        if (a > t){
            t = a;
        }
        if (t > s) {
            int tmp;
            tmp = s;
            s = t;
            t = tmp;
        }
        if (s > f){
            int tmpo;
            tmpo = f;
            f = s;
            s = tmpo;
        }
    }
    cout << f << endl;
    cout << s << endl;
    cout << t << endl;
    return 0;
}
