#include using namespace std; int a[5000], n; int main() { cin >> n; for (int i = 0; i < n; i++)cin >> a[i]; for (int i = 0; i < 2 * n - 3; i++) { for (int j = 0; j < n; j++) { int T1 = j, T2 = i - j; if (T2 < 0 || T2 >= n)continue; if (a[T1] > a[T2] && T1 < T2)swap(a[T1], a[T2]); } } for (int i = 0; i < n; i++) { if (i != 0)cout << ' '; cout << a[i]; }cout << endl; return 0; }