#include <iostream>

using namespace std;

int a[100000];
void sort( int * a, int i)
{
    int j, k;
    for( j = 0; j < i; j++ )
    {
        int min_index = j;
        for( k = j+1; k < i; k++ )
        {
            if( a[k] < a[min_index] )
                min_index = k;
        }
        if( j != min_index )
        {
            int tmp = a[j];
            a[j] = a[min_index];
            a[min_index] = tmp;
        }
    }
}
int main()
{
    int i = 0, j;
    while( cin >> a[i++] )
        ;
    sort( a, i );
    for( j = i - 3; j < i; j++ )
        cout << a[j] << endl;
    return 0;
}