#include <iostream>
using namespace std;
int main(void){

    int n1=0;
    int n2=0;
    int n3=0;
    int h;
    while(cin >> h){
        int tmp;
        if(h>n3) n3=h;
        if(n3>n2){
            tmp=n2;
            n2=n3;
            n3=tmp;
        }
        if(n2>n1){
            tmp=n1;
            n1=n2;
            n2=tmp;
        }
    }
    
    cout << n1 << endl;
    cout << n2 << endl;
    cout << n3 << endl;
    
    return 0;
}

