#include <iostream>
using namespace std;

int main() {
  int h[10];
  int a, b, c;
  for(int i=0; i<10; i++) {
    cin >> h[i];
  }
  a = b = c = -1;
  for(int i=0; i<10; i++) {
    if (h[i] > c) {
      if (h[i] > b) {
        if (h[i] > a) {
          c = b;
          b = a;
          a = h[i];
        }
        else {
          c = b;
          b = h[i];
        }
      } else {
        c = h[i];
      }
    }
  }
  cout << a << endl;
  cout << b << endl;
  cout << c << endl;
}