#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
  int Mou[10];
  int i;
  int n = 0;

  for(i = 0; i < 10; i++){
    cin >> Mou[i];
    n++;
  }

  sort(Mou , Mou + n);

    cout << Mou[n-1] << endl;
    cout << Mou[n-2] << endl;
    cout << Mou[n-3] << endl;
  
    return 0;
}