#include <iostream>
#include <stdlib.h>
using namespace std;
int comp(const void *value1, const void *value2){
    return *(const int *)value1 - *(const int *)value2;
}
int main() {
  int height[10];
  for(int i=0; i<10; i++) cin >> height[i];
  qsort(height, 10, sizeof(int), comp);
  cout << height[9] << "\n" << height[8] << "\n" << height[7] << endl;
  return 0;
}