#include <stdio.h>
#include <stdlib.h>

int main()
{
	int a = 0, b = 0, c = 0;
	const int BUFF_SIZE = 20;
	char buff[BUFF_SIZE];

	for (int i = 0; i < 10; i++)
	{
		 fgets(buff, BUFF_SIZE, stdin);
		int h = atoi(buff);
		
		if (h > a)
		{
			c = b;
			b = a;
			a = h;
		}
		else if (h > b)
		{
			c = b;
			b = h;
		}
		else if (h > c)
		{
			c = h;
		}
	}

	printf("%d\n%d\n%d\n", a, b, c);
	
	return 0;
}