#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>

int is_valid_input(char *str) {
    for (int i = 0; str[i]; i++) {
        if (!isdigit(str[i])) {
            return 0;
        }
    }
    return 1;
}

void sort_scores(int *scores, int n) {
    for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < n - i - 1; j++) { 
            if (scores[j] > scores[j + 1]) {
                int temp = scores[j];
                scores[j] = scores[j + 1];
                scores[j + 1] = temp;
            }
        }
    }
}

int main() {
    char n_str[10];
    if (scanf("%s", n_str) != 1 || !is_valid_input(n_str)) {
        printf("Invalid input\n");
        return 0;
    }
    
    int n = atoi(n_str);
    if (n < 1 || n > 100) {
        printf("Invalid input\n");
        return 0;
    }
    int scores[n];
    char score_str[1000];
    if (scanf("%s", score_str) != 1) {
        printf("Invalid input\n");
        return 0;
    }
    char *token = strtok(score_str, " ");
    int count = 0;
    int valid = 1;
    while (token != NULL && count < n) {
        if (!is_valid_input(token)) {
            valid = 0;
            break;
        }
        scores[count++] = atoi(token);
        token = strtok(NULL, "");
    }
    if (!valid || count != n) {
        printf("Invalid input\n");
    } else {
        sort_scores(scores, n);
        for (int i = 0; i < n; i++) {
            printf("%d", scores[i]);
            if (i < n - 1) {
                printf(" ");
            }
        }
        printf("\n");
    }
    return 0;
}