#include <iostream>
using namespace std;

int main(void)
{
    int a;
    int b[3];
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        if(a>=b[0])
        {
            b[2] = b[1];
            b[1] = b[0];
            b[0] = a;
        }
        else if(a>=b[1])
        {
            b[2] = b[1];
            b[1] = a;
        }
        else if(a>=b[2])
        {
            b[2] = a;
        }

    }

    for (int i = 0; i < 3; i++)
    {
        cout << b[i] << "\n";
    }
}


