/* List of Top 3 Hills */
#include <iostream>
using namespace std;

int main(void) {
  int height[3] = {0,0,0};
  int n;
  while(cin >> n) {
    if (n > height[0]) {
      height[2] = height[1];
      height[1] = height[0];
      height[0] = n;
    }
    else if (n > height[1]) {
      height[2] = height[1];
      height[1] = n;
    }
    else if (n > height[2]) {
      height[2] = n;
    }
  }

  for (int i = 0; i < 3; i++) {
    cout << height[i] << endl;
  }

  return 0;
}
