#include #include #include #include typedef long long ll; #define fi first #define se second int n; int a[5123]; using namespace std; int main(){ cin>>n; int i; int j; int t; for( i = 0; i < n; i++ ){ scanf("%d", a+i); } /*for( i = 0; i < n; i++ ){ printf("%d ", a[i] ); } puts(""); */ for( i = 1; i < (2*n - 3); i++ ){ for( j = 0; j < (i+1)/2; j++ ){ if( a[j] > a[i-j] && (i - j) < n){ t = a[j]; a[j] = a[i-j]; a[i-j] = t; } } } for( i = 0; i < n; i++ ){ if( i )printf(" %d", a[i] ); else{ printf ("%d", a[i] );} } puts(""); return 0; }