/******************************************
- AUTHOR : PRIYAM THAKURIA*
- NICK : psiphon_hack *
- INSTITUTION : NIT Kurukshetra *
******************************************/
#include<bits/stdc++.h>
#define ll long long int
#define mod 1000000007
#define REP(i,a,b) for (int i = a; i < b; i++)
#define rep(i,a,b) for (int i = a; i >= b; i–)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”, stdout);
#endif
fastio
int n; cin >> n;
int a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
int e = a[i];
int j = i - 1;
while (j >= 0 and a[j] > e) {
a[j + 1] = a[j];
j--;
}
a[j + 1] = e;
}
for (int i = 0; i < n; i++)
cout << a[i] << " ";
return 0;
}