#include<iostream>
#include<algorithm>
using namespace std;
int main()
{

		int a=0,b=0,c=0;
		int m;
		for(int i=1;i<=10;i++)
		{
			cin>>m;
			if(m>=a)
			{
				int temp;
				temp=b;
				b=a;
				c=temp;
				a=m;
				
			}
			else if(m>=b)
			{
				int z;
				c=b;
				b=m;
			}
			else if(m>=c)
			{
				c=m;
			}
			
		}
		cout<<a<<endl;
		cout<<b<<endl;
		cout<<c<<endl;
}
