#include<stdio.h>
#define INFTY 1000000001;

void merge(int *A,int left,int mid,int right);
void mergeSort(int *A,int left,int right);

main(){

  int i;
  int n;
  int S[500000];
  
  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }

  merge(S,0,(n+1)/2,n+1);

  for(i=0;i<n;i++){
    printf("%d");
    if(i==n-1) printf("\n");
    else printf(" ");
  }
  return 0;
}

void merge(int *A,int left,int mid,int right){
  int i,j,k;
  int L[250000],R[250000];
  int n1,n2;

  n1=mid-left;
  n2=right-mid;

  /* L[0...n1],R[0...n2]を生成 */
  for(i=0;i<n1;i++){
    L[i]=A[i+left];
  }
  for(i=0;i<n2;i++){
    R[i]=A[i+mid];
  }

  L[n1]=INFTY;
  R[n2]=INFTY;
  i=0;
  j=0;
  for(k=left;k<right;k++){
    if(L[i]<=R[j]){
      A[k]=L[i];
      i=i+1;
    }
    else{
      A[k]=R[j];
      j=j+1;
    }
  }
}

void mergeSort(int *A,int left,int right){
  int mid;
  if(left+1<right){
    mid=(left+right)/2;
    mergeSort(A,left,mid);
    mergeSort(A,mid,right);
    merge(A,left,mid,right);
  }
}