#include <iostream>
using namespace std;
int main()
{
int big1;
cin >> big1;
int big2=0;
int big3=0;
int input;
for(int i=2;i<=10;i++)
{cin >> input;
if(input>=big1 && input>=big2 && input>=big3)
{big3=big2;
big2=big1;
big1=input;}
else if(input>=big2 && input>=big3)
{big3=big2;
big2=input;}
else if(input>=big3)
{big3=input;}
}
cout << big1 << endl << big2 << endl << big3 << endl;
return 0;
}
