#include #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) FOR(i,0,n) #define repr(i,n) for(int i=(n)-1;0<=i;--i) #define each(e,v) for(auto&& e:(v)) #define DUMP(x) cerr<<#x<<": "<<(x)<; using vdouble = vector; using vstring = vector; using ll = long long; template void chmin(T& a, const T& b) { a = min(a, b); } template void chmax(T& a, const T& b) { a = max(a, b); } int main() { int n; cin >> n; vint a(n); rep(i, n) cin >> a[i]; FOR(i, 1, 2 * n - 3) { rep(p, n) { int q = i - p; if(q < 0 || n <= q) continue; if(q <= p) continue; if(a[p] > a[q]) swap(a[q], a[p]); } } rep(i, n) { cout << a[i]; if(i != n-1) cout << " "; } cout << endl; return 0; }