#include <queue>
#include <iostream>
using namespace std;

int main() {
  priority_queue<int> que;
  for (int i = 0; i < 10; i++) {
    int height;
    cin >> height;
    que.push(height);
  }
  cout << que.top() << endl; que.pop();
  cout << que.top() << endl; que.pop();
  cout << que.top() << endl; que.pop();
  return 0;
}