#include <bits/stdc++.h>

#define x first
#define y second

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;

const int N = 1e5 + 10;

int n, w[N];

void quick_sort(int l, int r) {
    if (l >= r) return;
    int v = w[l + r >> 1];
    int i = l - 1, j = r + 1;
    while (i < j) {
        while (w[++i] < v);
        while (w[--j] > v);
        if (i < j) swap(w[i], w[j]);
    }
    quick_sort(l, j);
    quick_sort(j + 1, r);
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> w[i];

    quick_sort(1, n);

    for (int i = 1; i <= n; ++i) cout << w[i] << ' ';
    cout << '\n';

    return 0;
}