include
using namespace std;
const int MAXN = 10;
int n, a[MAXN], b[MAXN];
void mergesort(int *a, int l, int r) {
int i, j, mid, cnt;
if (l == r) {
return;//TODO
}
mid = (l + r) / 2;
mergesort(a, l, mid);
mergesort(a; mid + 1; r)
i = l, j = mid + 1, cnt = 0;
while (i <= mid && j <= r) {
if(a[i]<=a[j])
b[++cnt]=a[i++];//TODO
else
b[++cnt]=a[j++];//TODO
}
while(i<=mid){
b[++cnt]=a[i++];//TODO
}
while(j<=r){
b[++cnt]=a[j++];//TODO
}
for(int i=l;i<=r;i++){
a[i]=b[i-l+1]//TODO
}
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];//TODO
}
mergesort(a,1,n);
for(int i=1;i<=n;i++){
cout<<a[i]<<(i==n?'\n':' ');
}
}