#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;

int main()
{
    iostream::sync_with_stdio(false);
    int n;
    cin>>n;
    int a[n], i;
    for(i=0; i<n; ++i)
        cin>>a[i];
    if(n==1)
        cout<<a[0];
    else if(n==2)
    {
        cout<<a[1]<<" "<<a[0];
    }
    else if(n>2)
    {
        sort(a, a+n, greater<int>());
        for(i=0; i<n; ++i)
            cout<<a[i]<<" ";
    }
    cout<<"\n";
    return 0;
}