#include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>

using namespace std;

int comp(int a,int b){
    int buffer;
    if(a > b){
        b = buffer;
        b = a;
        a = buffer;
        return 1;
    }
    else{
        return 0;
    }
}

int main(){
    int k[5];
    cin >> k[0] >> k[1] >> k[2] >> k[3] >> k[4];
    while(comp(k[0],k[1]) || comp(k[1],k[2]) || comp(k[2],k[3]) || comp(k[3],k[4])){
    }
    cout << k[4] << " " << k[3] << " " << k[2] << " " << k[1] << " " << k[0] << endl;
    return 0;
}