#include<bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i,n)for(int i=0;i<n;i++)

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a,b,c,d,e;
  while(cin >> a >> b >> c>> d>> e){
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    v.push_back(d);
    v.push_back(e);
    sort(v.begin(), v.end(), greater<int>());
    cout << v[0] <<" "<<v[1]<<" "<<v[2]<<" "<<v[3]<<" "<<v[4]<<endl;
  }
  return 0;
}

