#include <bits/stdc++.h>
using namespace std;
int main() {
  int max1, max2, max3, A[10];
  for (int i = 0; i < 10; i++) {
    cin >> A[i];
    max1 = max2 = max3 = A[0];
    if (A[i] > max1)
      max1 = A[i];
    else if (A[i] > max2)
      max2 = A[i];
    else if (A[i] > max3)
      max3 = A[i];
  }
  cout << endl << max1 << endl << max2 << endl << max3 << endl;
  return 0;
}
