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