//
// Created by Undefined on 2018/2/2.
//

#include <iostream>

using namespace std;

int main() {
    int a, b, c, tmp;
    a = b = c = 0;
    for (int i = 0; i < 10; i++) {
        scanf("%d", &tmp);
        if (tmp > a) {
            c = b;
            b = a;
            a = tmp;
        } else if (tmp > b) {
            c = b;
            b = tmp;
        } else if (tmp > c) {
            c = tmp;
        }
    }
    printf("%d\n%d\n%d\n", a, b, c);
    return 0;
}
