#include <stdio.h>
int main()
{
    int a, max_1 = 0, max_2 = 0, max_3 = 0;
    using namespace std;
    for (int I = 0; I < 10; I++)
    {
        scanf("%d", &a);
        if (a>  max_1)
        {
            max_3 = max_2; max_2 = max_1; max_1 = a;
        }
        else if(a > max_2)
        {
            max_3 = max_2; max_2 = a;
        }
        else if (a > max_3)
        {
            max_3 = a;
        }
    }
    printf("%d\n%d\n%d\n", max_1, max_2, max_3);
    return 0;
}
