#include <iostream>
using namespace std;
int main(){
    int x,h1=0,h2=0,h3=0;
    for(int i=0;i<10;i++){
        cin >> x;
        if(h1<=x){
            h3 = h2;
            h2 = h1;
            h1 = x;
        }else if(h1>=x && x>=h2){
            h3 = h2;
            h2 = x;
        }else if(h2>=x && x>=h3){
            h3 = x;
        }
    }
    cout << h1 << endl << h2 << endl << h3 << endl;
    return 0;
}
