#include <iostream>
using namespace std;

int main()
{
  int mt[10];
  int high[3];
  int height;
  

  for(int i=0;i<=9;i++)
    {
      cin >> height;
      mt[i] = height;
    }

  for(int i=0;i<=2;i++)
    {
      high[i] = 0;
    }

  for(int i=0;i<=9;i++)
    {
      if(mt[i]>=high[2])
	{
	  high[2] = mt[i];
	}
      if(mt[i]>=high[1])
	{
	  high[2] = high[1];
	  high[1] = mt[i];
	}
      if(mt[i]>=high[0])
	{
	  high[2] = high[1];
	  high[1] = high[0];
	  high[0] = mt[i];
	}
    }

  for(int i=0;i<=2;i++)
    {
      cout << high[i] << endl;
    }

  return 0;
}

      