#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
  vector<int> v;
  for (int i = 0; i < 5; i++) {
    int n;
    cin >> n;
    v.push_back(n);
  }
  sort(v.begin(), v.end(), greater<int>());
  cout << v[0] << ' ' << v[1] << ' ' << v[2] << ' ' << v[3] << ' ' << v[4] << endl;
}