#include <stdio.h>

static const int N = 1000;

void trace(int A[], int n){
  int i;
  for ( i = 1; i <= n; i++ ){
    if ( i > 1 ) printf(" ");
    printf("%d", A[i]);
  }
  printf("\n");
}

int main(){
    int n, i, j;
    int A[N+1];
    bool done = 1;
    scanf("%d", &n);

    for ( i = 1; i <= n; i++ ) scanf("%d", &A[i]);

    trace(A, n);
    for(i = 0; i < size; i++)
    {
        for(j = 0; j < size - 1 - i; j++)
        {
            if (list[j] > list[j + 1])
            {
                list[j] = list[j + 1] ^ list[j];
                list[j + 1] = list[j + 1] ^ list[j];
                list[j] = list[j + 1] ^ list[j];
                done = 0;
            }
        }
        if(done == 1)
            break;
    }

    return 0;
}