#include <iostream>
using namespace std;

int main()
{
	int first = 0, second = 0, third = 0;
	int height;
	for (int i = 0; i < 10; i++)
	{
		scanf("%d", &height);
		if (height > first)
		{
			third = second;
			second = first;
			first = height;
		}
		else if (height > second)
		{
			third = second;
			second = height;
		}
		else if (height > third)
		{
			third = height;
		}
	}
	printf("%d\n%d\n%d\n", first, second, third);
}