#include<iostream>
using namespace std;

int main(){
	int first = 0;
	int second = 0;
	int third = 0;
	int num;
	for(int i = 0;i<=9;i++)
	{

		cin >> num;
		
		if(num >= first)
		{
			third = second;
			second = first;
			first = num;
		}else if(num >= second)
		{
			third = second;
			second = num;
		}else if(num >=third)
		{
			third = num;
		}
		
	}
	
	cout << first << endl << second << endl <<  third;
	
    return 0;
}