#include <cstdio>
#include <iostream>
using namespace std;

main()
{
  int data[10];
  int mpos;

  for ( int i = 0; i < 10; i++) {
    cin >> data[i];
  }
  
  for ( int i = 0; i < 3; i++) {
    mpos = 0;
    for ( int j = 0; j < 10; j++) {
      if ( data[mpos] < data[j] ){
	mpos = j;
      }
    }
    cout << data[mpos] << endl;
    data[mpos] = -1;
  }

  return (0);
}

