#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    int i, j, temp;
    int number[15];

    for (i=0; i<10; i++)
    {
        scanf("%d", &number[i]);
    }

    for (i=0; i<5; i++)
    {
        for (j=i+1; j<5; j++)
        {
            if (number[i] < number[j])
            {
                temp = number[i];
                number[i] = number[j];
                number[j] = temp;
            }
        }
    }

    for (i=0; i<3; i++)
    {
        printf("%d\n", number[i]);
    }

    return 0;
}