#include <iostream>
using namespace std;
int main(){
    int n , mountain[11] ;
    for( int i=0 ; i<10 ; i++ )
        cin >> mountain[i] ;
    for( int i=0 ; i<10 ; i++ ){
        for( int j=i+1 ; j<10 ; j++ ){
            if( mountain[i] > mountain[j] )
                swap( mountain[i] , mountain[j] );
        }
    }
    cout << mountain[9] << endl << mountain[8] <<endl << mountain[7] << endl;
}