#include <iostream>
using namespace std;
template <class Type>
void swap(Type* A, int i, int j){
Type temp = A[i];
A[i] = A[j];
A[j] = temp;
}
template <class Type>
int Partition(Type* A,int left, int right){
int l = left, r = right;
Type temp = A[r];
while(l < r){
while(A[l] <= temp && l<r) l++;
while(A[r] >= temp && l<r) r--;
if(l < r){
swap(A,l,r);
l++;
}
}
A[right] = A[l];
A[l] = temp;
return l;
}
template <class Type>
void QuickSort(Type* A, int left,int right){
if(left >= right) return;
int pivot = Partition(A, left,right);
QuickSort(A,left,pivot-1);
QuickSort(A,pivot+1,right);
}
int a[100];
int main(){
int n;
cin >> n;
for(int i = 0; i < n;i++)
cin >> a[i];
QuickSort(a,0,n-1);
for(int i = 0; i < n;i++)
cout<< a[i] << " ";
cout<<endl;
return 0;
}