#include <stdio.h>

#define MAX 100

int stack[MAX];
int top = -1;
#include <stdio.h>

#define MAX 100

int stack[MAX];
int top = -1;
int temp[MAX];
// Push element to stack
void push(int value) {
    if (top < MAX - 1)
        stack[++top] = value;
}

// Pop element from stack
int pop() {
    if (top >= 0)
        return stack[top--];
    return -1;
}

// Sort stack in descending order (largest on top)
void sortStack(int n) {
    // Copy stack to temp array
    int temp[MAX];
    for (int i = 0; i < n; i++)
        temp[i] = stack[i];

    // Simple bubble sort in descending order
    for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < n - 1 - i; j++) {
            if (temp[j] < temp[j + 1]) {
                int t = temp[j];
                temp[j] = temp[j + 1];
                temp[j + 1] = t;
            }
        }
    }

    // Push sorted values back to stack
    top = -1; // reset stack
    for (int i = 0; i < n; i++)
        push(temp[i]);
}

// Display stack from top to bottom
void displayStack() {
    for (int i = top; i >= 0; i--)
        printf("%d ", stack[i]);
    printf("\n");
}

int main() {
    int n;
    scanf("%d", &n);

    if (n < 0) {
        printf("Invalid input\n");
        return 0;
    }

    for (int i = 0; i < n; i++) {
        int val;
        scanf("%d", &val);
        push(val);
    }

    sortStack(n);
    displayStack();

    return 0;
}

// Push element to stack
void push(int value) {
    if (top < MAX - 1)
        stack[++top] = value;
}

// Pop element from stack
int pop() {
    if (top >= 0)
        return stack[top--];
    return -1;
}

// Sort stack in descending order (largest on top)
void sortStack(int n) {
    // Copy stack to temp array
    
    for (int i = 0; i < n; i++)
        temp[i] = stack[i];

    // Simple bubble sort in descending order
    for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < n - 1 - i; j++) {
            if (temp[j] < temp[j + 1]) {
                int t = temp[j];
                temp[j] = temp[j + 1];
                temp[j + 1] = t;
            }
        }
    }

    // Push sorted values back to stack
    top = -1; // reset stack
    for (int i = 0; i < n; i++)
        push(temp[i]);
}

// Display stack from top to bottom
void displayStack() {
    for (int i = top; i >= 0; i--)
        printf("%d ", temp[i]);
    printf("\n");
}

int main() {
    int n;
    scanf("%d", &n);

    if (n < 0) {
        printf("Invalid input\n");
        return 0;
    }

    for (int i = 0; i < n; i++) {
        int val;
        scanf("%d", &val);
        push(val);
    }

    sortStack(n);
    displayStack();

    return 0;
}