#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c;
    a=0;
    b=0;
    c=0;
    int r[10]={};
    for(int u=1;u<=10;u++){
        cin>>r[u];
        if(a<r[u]){
            c=b;
            b=a;
            a=r[u];
        }else if(b<r[u]){
            c=b;
            b=r[u];
        }else if(c<r[u]){
            c=r[u];
        }
    }
    cout<<a<<endl;
    cout<<b<<endl;
    cout<<c<<endl;
}

