#include <iostream>
using namespace std;

int main(){
  int i1,i2,i3,buff;
  for(int x = 0; x < 10; x++){
    cin >> i3;
    if(i3 > i2){
      buff = i2;
      i2 = i3;
      i3 = buff;
    }
    if(i2 > i1){
      buff = i1;
      i1 = i2;
      i2 = buff;
    }
    
  }
  cout << i1 << endl << i2 << endl << i3 << endl;
  return 0;
}