#include <stdio.h>
#define N 100000

int A[N];

int partition(int p, int r) {
  int i, j, x, tmp;
  x = A[r];
  i = p-1;
  for (j = p; j < r; j++) {
    if(A[j] <= x) {
      i++;
      tmp = A[i];
      A[i] = A[j];
      A[j] = tmp;
    }
  }
  tmp = A[i+1];
  A[i+1] = A[r];
  A[r] = tmp;
  return i+1;
}

void quickSort(int p, int r) {
  int q;
  if (p < r) {
    q = partition(p, r);
    quickSort(p, q-1);
    quickSort(q+1, r);
  }
}

int main() {
  int n, i, j;

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

  quickSort(0, n-1);

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

}