#include<iostream>
#include<cstdlib>
using namespace std;

void top3()
{
    int temp;
    int bil[10];
    int i = 0;

    while(i<10)
    {
        cin >> bil[i];
        if(bil[i] >=0 && bil[i] <= 10000)
            i++;
        else
            exit(1);
    }
    for(int i = 0; i < 10-1; i++)
    {
        for(int j = i+1; j < 10; j++ )
        {
            if(bil[j] > bil[i])
            {
                temp = bil[i];
                bil[i] = bil[j];
                bil[j] = temp;
            }
        }
    }
    for(int i = 0; i < 3; i++)
    {
        cout << bil[i]<< endl;
    }
}


int main () {

    top3();

return 0;

}