#include<iostream>
using namespace std;
int main()
{
	int max = 0;
	int b;
	int a[10];
	for(int i = 0;i<=9;i++)
	{
		cin >> a[i];
	}
	for(int k = 1;k<=3;k++)
	{
	  for(int j = 0;j<=9;j++)
	  {
		if(a[j]>max)
		{
			max=a[j];
			b=j;
		}

	  }
	  cout << max << endl;
	  a[b] = 0;
	  max = 0;
	}
	return 0;
}