#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define PI acos(-1.0) #define FOR(I,A,B) for(int I = (A); I < (B); ++I) int main(){ int n; cin >> n; ll a[n]; FOR(i, 0, n) cin >> a[i]; FOR(i, 1, 2*n-3 + 1){ FOR(p, 0, n){ int q = i - p; if(q<0 || q>n || p>=q) continue; if(a[p]>a[q]){ ll tmp = a[p]; a[p] = a[q]; a[q] = tmp; } } } FOR(i, 0, n){ if(i) cout << " "; cout << a[i]; } cout << endl; }