#include <bits/stdc++.h>
using namespace std;
deque<int> Merge(deque<int>& a,deque<int>& b){
deque<int> v;
while(a.size()!=0 && b.size()!=0){
if(a.front()<=b.front()){
v.push_back(a.front());
a.pop_front();
}
else{
v.push_back(b.front());
b.pop_front();
}
}
while(a.size()!=0 || b.size()!=0){
if(a.size()!=0){
v.push_back(a.front());
a.pop_front();
}
else{
v.push_back(b.front());
b.pop_front();
}
}
return v;
}
void Sort(deque<int>& v){
if(v.size()<=1) return;
deque<int> a(v.begin(),v.begin()+(v.size()/2));
deque<int> b(v.begin()+(v.size()/2),v.end());
Sort(a);
Sort(b);
v=Merge(a,b);
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n,tmp;
deque<int> v;
while(cin>>n){
v.clear();
for(int i=0;i<n;i++){
cin>>tmp;
v.push_back(tmp);
}
Sort(v);
for(int i=0;i<n;i++){
cout<<v[i]<<" ";
}
cout<<"\n";
}
return 0;
}