#include <iostream>
#include <queue>
#include <algorithm>
 
int main(void) {
    std::priority_queue<int> height;
 
    for (int i = 0; i < 10; ++i) {
        int h;
        std::cin >> h;
        height.push(h);
    }
 
    for (int i = 0; i < 3; ++i) {
        std::cout << height.top() << std::endl;
        height.pop();
    }
 
    return 0;
}