#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;

int tmp;
vector<int> vec;

int main(){
    for (int i=0; i<10; i++) {
        scanf("%d",&tmp);
        vec.push_back(tmp);
        make_heap(vec.begin(),vec.end());
    }
    for (int i=0; i<3; i++) {
        printf("%d\n",vec.front());
        pop_heap(vec.begin(),vec.end());
        vec.pop_back();
    }
}