#include <iostream>
using namespace std;
int main(){
    int a,b,c,in,t;
    a=b=c=0;
    for(int i=0;i<10;i++){
        cin>>in;
        if(in>a){
            t=a;
            a=in;
            in =t;
        }
        if(in>b){
            t=b;
            b=in;
            in =t;
        }
        if(in>c){
            t=c;
            c=in;
            in =t;
        }
    }
    cout<<a<<endl;cout<<b<<endl;cout<<c<<endl;
    return 0;
}