#include<stdio.h>
#include <stdlib.h>
#include <string.h>

#define INFTY 1000000000
#define N 500000

int flag=0;

int merge(int A[],int left,int mid,int right);
int MS(int A[],int left,int right);

int main(void){
	
	int n,S[N],i;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){scanf("%d",&S[i]);}
	
	MS(S,0,n);
	
	for(i=0;i<n;i++){
		if(i!=0)printf(" ");
		printf("%d",S[i]);
	}
	
	return 0;}
	
int merge(int A[],int left,int mid,int right){
	
	int n1 = mid -left;
	int n2 = right - mid;
	int L[N/2],R[N/2];
	int i,j,k;
	
	for(i=0;i<n2;i++){
		L[i] = A[left + i];
	}
	for(i=0;i<n1;i++){
		R[i] = A[mid + i];
	}
	
	L[n1]=INFTY;R[n2]=INFTY;
	i=0;j=0;
	for(k=0;k == (left+right-1);k++){
		
		if(L[i]<=R[j]){A[k]=L[i];i++;}
		else{A[k]=R[j];j++;}
		
	}
	
	return 0;}
	
int MS(int A[],int left,int right){
	
	int mid;
	if(left<=right)mid = (left+right)/2;
	
	MS(A, left, mid);
    MS(A, mid, right);
    merge(A, left, mid, right);
	
	return 0;}