#include<bits/stdc++.h>
using namespace std;
void Sort(vector<int> &arr,int low,int mid,int high)
{
    int left=low;
    int right=mid+1;
    vector<int> temp;
    while(left<right &&right<=high)
    {
        if(arr[left]<= arr[right])
        {
            temp.push_back(arr[left]);
            left++;
        }
        else if(arr[left]>arr[right])
        {
            temp.push_back(arr[right]);
            right++;
        }
    }
    while(left<right)
    {
        temp.push_back(arr[left]);
        left++;
    }
    while(right<=high)
    {
        temp.push_back(arr[right]);
        right++;
    }
    for(int i=low;i<=high;i++)
    {
        arr[i]=temp[i-low];
    }
}
void mergeSort(vector<int> &arr,int low,int high)
{
    if(low>=high)
    return;
    int mid=(low+high)/2;
    mergeSort(arr,low,mid);
    mergeSort(arr,mid+1,high);
    Sort(arr,low,mid,high);
}
void main()
{
    int n;
    cin >> n;
    
    vector<int> arr(n);
    
    for(int i=0;i<n;i++)
    {
        cin >> arr[i];
    }
    
    mergeSort(arr,0,n-1);
    
    for(auto it:arr)
    cout<<it<<" ";
}