#include <iostream>
using namespace std;

int main()
{
	int Mt[9];
	int i,w,max,second,third;
	
	for ( i = 0; i <= 9; i++)
	{
		cin >> Mt[i];

	}
	
	 max = Mt[0];

	for (i = 0; i <= 9; i++)
	{
		
		w = Mt[i];

		if (max < Mt[i])
		{
			Mt[i] = max;
			max = w;
		} //max??????

		//max,second,third????????????
	}
	
	 second = Mt[1];
    
	for (i = 1; i <= 9; i++)
	{
		w = Mt[i];

		if (second < Mt[i])
		{
			Mt[i] = second;
			second = w;
		}
	}

	 third = Mt[2];

	 for (i = 2; i <= 9; i++)
	 {
		 w = Mt[i];

		 if (third < Mt[i])
		 {
			 Mt[i] = third;
			 third = w;
		 }
	 }

	cout << max << endl;
	cout << second << endl;
	cout << third << endl;
  return 0;
}