#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
// tang dan
int cmp(const void *a , const void *b){
int *x = (int*) a;
int *y = (int*) b;
return *x - *y ;
}
// giam dan
int cmp2(const void *a , const void *b){
int *x = (int*) a;
int *y = (int*) b;
return *y - *x ;
}
int main () {
int n ; scanf("%d",&n);
int a[n];
for(int i = 0 ; i < n ; i++){
scanf("%d",&a[i]);
}
qsort(a , n , sizeof(int) , cmp2); // qsort(mang, so phan tu , sizeof(), cmp)
for(int i = 0 ; i < n ; i++){
printf("%d ", a[i]);
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPGN0eXBlLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KLy8gdGFuZyBkYW4KaW50IGNtcChjb25zdCB2b2lkICphICwgY29uc3Qgdm9pZCAqYil7CglpbnQgKnggPSAoaW50KikgYTsKCWludCAqeSA9IChpbnQqKSBiOwoJcmV0dXJuICp4IC0gKnkgOwp9CgovLyBnaWFtIGRhbgppbnQgY21wMihjb25zdCB2b2lkICphICwgY29uc3Qgdm9pZCAqYil7CglpbnQgKnggPSAoaW50KikgYTsKCWludCAqeSA9IChpbnQqKSBiOwoJcmV0dXJuICp5IC0gKnggOwp9CgppbnQgbWFpbiAoKSB7CglpbnQgbiA7IHNjYW5mKCIlZCIsJm4pOwoJaW50IGFbbl07Cglmb3IoaW50IGkgPSAwIDsgaSA8IG4gOyBpKyspewoJCXNjYW5mKCIlZCIsJmFbaV0pOwoJfQoJCglxc29ydChhICwgbiAsIHNpemVvZihpbnQpICwgY21wMik7IC8vIHFzb3J0KG1hbmcsIHNvIHBoYW4gdHUgLCBzaXplb2YoKSwgY21wKQoJZm9yKGludCBpID0gMCA7IGkgPCBuIDsgaSsrKXsKCQlwcmludGYoIiVkICIsIGFbaV0pOwoJfQoJCn0=