#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
const int M = 100;
int s[M];
void merge(int *s,int low,int high,int mid);
void mergesort(int *s,int low,int high)//先拆开再合并的过程
{
int mid = (low+high)/2;
if(low<high)
{
mergesort(s,low,mid);//拆前面
mergesort(s,mid+1,high);//拆后面
merge(s,low,high,mid); //合并
}
}
void merge(int *s,int low,int high,int mid)//把两个子序列合并的过程
{
int *b = new int [high-low+1];
int i = low, j = mid+1, k=0;
while(i<=mid&&j<=high)
{
if(s[i]<=s[j])
b[k++] = s[i++];
else
b[k++] = s[j++];
}
while(i<=mid)
b[k++] = s[i++];
while(j<=high)
b[k++] = s[j++];
for(i=low,k=0;i<=high;i++,k++)
s[i] = b[k];
delete []b;
}
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
cin>>s[i];
mergesort(s,0,n-1);
for(int i=0;i<n;i++)
cout<<s[i]<<" ";
return 0;
}