#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
  vector <int> a(10);
  int x;
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  cout << "Hey" << endl;
  for (int i = 9; i > 6; i--) { 
    cout << a[i] << endl;
  }
  return 0;
}