#include <iostream>
using namespace std;

const int HILLS = 10;

void repMinOfThree(int hill[], int height)
{
    int *hillTmp = 0;
    if (height > hill[0] || height > hill[1] || height > hill[2])
    {
        hillTmp = (hill[0] < hill[1] ? hill : hill + 1);
        hillTmp = (hill[2] < *hillTmp ? hill+2 : hillTmp);
        *hillTmp = height;
    }
}

int cmp (const void *a, const void *b)
{
    return (*(int*)a - *(int*)b);
}


int main()
{
    int hill[3] = {0};
    int i = 0;
    int mountainHeight = 0;

    while (i < HILLS)
    {
        cin >> mountainHeight;
        repMinOfThree (hill, mountainHeight);
        i++;
    }

    qsort (hill, 3, sizeof(hill[0]), cmp);

    cout << hill[2] << endl
        << hill[1] << endl
        << hill[0] << endl;

  //  system("pause");
    return 0;
}