#include<bits/stdc++.h>
#define N 100010
using namespace std;
int Partition(int r[],int low,int high){
int i=low,j=high,pivot=r[low];
while(i<j){
while(i<j&&r[j]>pivot)
j--;
while(i<j&&r[i]<=pivot)
i++;
if(i<j)
swap(r[i++],r[j--]);
}
if(r[i]>pivot){
swap(r[i-1],r[low]);
return i-1;
}
else{
swap(r[i],r[low]);
return i;
}
}
void QuickSort(int r[],int low,int high){
if(low<high){
int mid=Partition(r,low,high);
QuickSort(r,low,mid-1);
QuickSort(r,mid+1,high);
}
}
int main(){
int n,a[N];
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i];
QuickSort(a,1,n);
for(int i=1;i<=n;i++)
cout<<a[i]<<" ";
return 0;
}