#include
using namespace std;
void merge(int arr[],int s,int e) {
int mid=(s+e)/2;
int i=s;
int k=s;
int j=mid+1;
int temp[100]={0};
while(i<=mid && j<=e) {
if(arr[i]>arr[j]) {
temp[k++]=arr[i++];
}
else {
temp[k++]=arr[j++];
}
}
while(i<=mid) {
temp[k++]=arr[i++];
}
while(j<=e) {
temp[k++]=arr[j++];
}
for(int i=s;i<=e;i++) {
arr[i]=temp[i];
}
}
void mergeSort(int arr[],int s,int e) {
///0 or 1 element
if(s>=e) {
return;
}
///1st - divide
int mid=(s+e)/2;
///Recursively arrays (s to mid) (mid+1 to e)
mergeSort(arr,0,mid);
mergeSort(arr,mid+1,e);
///2nd - sort
merge(arr,0,e);
}
int main() {
int n;
cin >> n;
int arr[100];
for(int i=0;i<n;i++) {
cin >> arr[i];
}
mergeSort(arr,0,n-1);
for(int i=0;i<n;i++) {
cout << arr[i] << " ";
}
return 0;
}