#include<iostream>
using namespace std;
int main()
{
	int a[10],i,top1=0,top2=0,top3=0;
	for(i=0; i<10; i++)
	{
		cin >> a[i];
		if(top1<a[i])
		{
			top3=top2;
			top2=top1;
			top1=a[i];
		}
		else if(top2<a[i])
		{
			top3=top2;
		    top2=a[i];
		}
		else if(top3<a[i])
		{
			top3=a[i];
		}
	}
	cout << top1 << "\n" << top2 << "\n" << top3 << "\n";
return 0;}