#include <iostream>

using namespace std;

int main() {
  int hill[10];
  for (int i = 0; i < 10; i++) {
    cin >> hill[i];
  }

  for (int i = 0; i < 3; i++) {
    int max = 0;
    for (int i = 0; i < 10; i++) {
      max = hill[i] > max ? hill[i] : max;
    }

    cout << max << endl;

    for (int i = 0; i < 10; i++) {
      if (hill[i] == max) {
        hill[i] = 0;
        break;
      }
    }
  }

  return 0;
}
