#include <iostream>
int main()
{
using namespace std;
int box[10];
for (int i=0;i<10;i++)
        cin >>box[i];
for (int i=1;i<10;i++)
{
        int key = box[i];
        int j = i-1;
        while (j>=0 && box[j] > key)
        {
                box[j+1]=box[j];
                j--;
        }
        box[j+1] = key;
}
cout << box[9] <<endl;
cout << box[8] <<endl;
cout << box[7] <<endl;
}