#include<iostream>
#include<vector>

using namespace std;

int main() {
  vector<int> A(4);
  while(cin >> A[0]) {
    for(int i = 0; i < 3; i++) {
      if(A[i] >= A[i+1]) swap(A[i], A[i+1]);
      else break;
    }
  }
  cout << endl;
  for(int i = 3; i > 0; i--) {
    cout << A[i] << endl;
  }
  return 0;
}
