#include <iostream>
#include <queue>

int main(void) {
    std::priority_queue<u_int> heights;
    
    for (u_int h, i = 0; i < 10; ++i) {
        std::cin >> h;
        heights.push(h);
    }
	
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights.top() << std::endl;
        heights.pop();
    }
    return 0;
}