#include <stdio.h>

int A[10000000];
int B[10000000];

void merging(int low, int mid, int high) {
   int l1, l2, i;

   for(l1 = low, l2 = mid + 1, i = low; l1 <= mid && l2 <= high; i++) {
      if(A[l1] <= A[l2])
         B[i] = A[l1++];
      else
         B[i] = A[l2++];
   }

   while(l1 <= mid)
      B[i++] = A[l1++];

   while(l2 <= high)
      B[i++] = A[l2++];

   for(i = low; i <= high; i++)
      A[i] = B[i];
}

void sort(int low, int high) {
   int mid;

   if(low < high) {
      mid = (low + high) / 2;
      sort(low, mid);
      sort(mid+1, high);
      merging(low, mid, high);
   } else {
      return;
   }
}

int main() {
   int i,n;
   scanf("%d",&n);

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

   for(i = 0; i <= n; i++){
      printf("%d ", A[i]);
    }
    printf("\n");
}

