#include <iostream>


int main()
{
	int mountain,first=1, second=1, third=1;

	for(int i=0;i<10;++i)
	{
		std::cin >> mountain;

		

		if(first<mountain )
		{
			third = second;

			second = first;

			first = mountain;
		}

		else if(second<mountain)
		{
			third = second;

			second = mountain;
		}

		else if(third<mountain)
		{
			third = mountain;
		}

	}

	std::cout << first << '\n' << second << '\n' << third << '\n';
}