#include<iostream>
int main()
{
	int h1 = -1, h2 = -1, h3 = -1;
	for(int i = 0; i < 10; i++)
	{
		int h;
		std::cin >> h;
		if(h > h1)
		{
			h3 = h2;
			h2 = h1;
			h1 = h;
		}
		else if(h > h2)
		{
			h3 = h2;
			h2 = h;
		}
		else if(h > h3)
		{
			h3 = h;
		}
	}
	std::cout << h1 << std::endl;
	std::cout << h2 << std::endl;
	std::cout << h3 << std::endl;
	return 0;
}
