#include <iostream>
#include <conio.h>
using namespace std ;

int hills[10] ;
int tops[3] = {0,0,0} ;

int main()
{
	for( int i = 0 ; i < 10 ; i ++ )
	{
		cin >> hills[i] ;

		if( hills[i] >= tops[0] )
		{
			tops[2] = tops[1] ;
			tops[1] = tops[0] ;
			tops[0] = hills[i] ;
		}
		else if( hills[i] >= tops[1] )
		{
			tops[2] = tops[1] ;
			tops[1] = hills[i] ;
		}
		else if( hills[i] >= tops[2] )
		{
			tops[2] = hills[i] ;
		}
	}

	for( int i = 0 ; i < 3 ; i ++ )
	{
		cout << tops[i] << "\n" ;
	}

	_getch() ;
	return 0 ;
}