#include <iostream>
using namespace std;

int main()
{
  int h1, h2, h3, n, tmp;
  h1 = h2 = h3 = 0;
  for(int i = 0; i < 10; i++){
    cin >> n;
    h1 = (i == 0) ? n : h1;
    h2 = (i == 1) ? n : h2;
    h3 = (i == 2) ? n : h3;
    if(h1 < h2){
      tmp = h1;
      h1 = h2;
      h2 = tmp;
    }
    if(h2 < h3){
      tmp = h2;
      h3 = h2;
      h2 = tmp;
    } 
    if(i > 2){
      if(n > h1){
	h3 = h2;
	h2 = h1;
	h1 = n;
      }else{
	if(n > h2){
	  h3 = h2;
	  h2 = n;
	}else{
	  if(n > h3){
	    h3 = n;
	  }
	}
      }
    }
  }
  cout << h1 << endl << h2 << endl << h3 << endl;
}