#include<iostream>
using namespace std;
int main()
{
    int i[3]={0};
    for(int j=0;j<=10;++j)
    {
        int height;
        cin>>height;
        if(height>=i[2])
        {
            if(height>=i[1])
            {
                if(height>=i[0])
                {
                    i[2]=i[1];
                    i[1]=i[0];
                    i[0]=height;
                }
                else
                {
                    i[2]=i[1];
                    i[1]=height;
                }
            }
            else
            {
                i[2]=height;
            }
        }
    }
    for(int j=0;j<=2;++j)
    {
        cout<<i[j]<<endl;
    }
}