#include <stdio.h>
#include <list>
using namespace std;

int main() {
    int m;
    list<int> mountain = list<int>();
    for (int i = 0; i < 10; i++) {
        scanf("%d", &m);
        mountain.push_back(m);
    }
    mountain.sort();
    for (int i = 0; i < 3; i++) {
        printf("%d\n", mountain.back());
        mountain.pop_back();
    }
    return 0;
}
