#include<iostream>
using namespace std;
int partien(int l[],int low,int high){
int pivot;
pivot=l[low];
while (low<high)
{
while (low<high&&l[high]>=pivot) high--;
l[low]=l[high];
while(low<high&&l[low]<=pivot) low++;
l[high]=l[low];
}
l[low]=pivot;
return low;
}
void quick_sort(int l[],int low,int high){
if(low<high)
{
int pivotdir =partien(l,low,high);
partien(l,low,pivotdir-1);
partien(l,pivotdir+1,high);
}
}
int main(){
int len;
cin>>len;
int l[len];
for(int i=0;i<len;i++){
cin>>l[i];
}
quick_sort(l,0,len-1);
for(int i=0;i<len;i++){
cout<<l[i]<<" ";
}
}