#include <string>
#include <queue>
#include <iostream>

using namespace std;

int main()
{
	priority_queue<int> height;
	int i = 0, tmp;

	while ( i < 10 )
	{
		cin >> tmp;
		height.push( tmp );
		i = i + 1 ;
	}
	
	for ( i = 0 ; i < 3 ; i = i + 1 )
	{
		cout << height.top() << endl;
		height.pop();
	}

	return 0;
}