#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; cin >> n; vector a(n); rep(i, n) cin >> a[i]; for (int i = 1; i < 2 * (n - 1); ++i) { for (int p = 0; p <= i; ++p) { int q = i - p; if (p >= q || q >= n) continue; if (a[p] > a[q]) swap(a[p], a[q]); } } rep(i, n) cout << a[i] << (i == n - 1 ? '\n' : ' '); return 0; }