#include <iostream>
using namespace std;
int partition(int a[], int l,int r){
int v = a[l];
while ( l < r ){
while ( l < r && a[r] >= v ) r--;
a[l] = a[r];
while ( l < r && a[l] <= v ) l++;
a[r] = a[l];
}
a[l] = v;
return l;
}
void qsort(int a[], int l, int r){
if ( l >= r ) return;
int mid = partition( a,l,r );
qsort( a,l,mid - 1 );
qsort( a,mid + 1,r );
}
int main(){
int a[1005];
int n;
cin >> n;
for (int i = 0; i < n;i++){
cin >> a[i];
}
qsort(a,0,n - 1);
for (int i = 0;i < n ;i++){
cout << a[i] << " ";
}
return 0;
}