#include<iostream>
using namespace std;

#define MAX 10000

int main(void)
{
	int rank[3] = {0,0,0};
	int mount_data;
		
	for(int i=0;i<10;i++)
	{
		cin>>mount_data;
		if(mount_data > rank[0])
		{
			rank[2] = rank[1];
			rank[1] = rank[0];
			rank[0] = mount_data;
		}
		else if(mount_data > rank[1])
		{
			rank[2] = rank[1];
			rank[1] = mount_data;
		}
		else if(mount_data > rank[2])
		{
			rank[2] = mount_data;
		}
	}
	
	for(int i=0;i<3;i++)
	{
		cout<<rank[i]<<endl;
	}
return 0;		
}