#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int read_and_validate_scores(const char* score_str, int n, int* scores){
    char* token;
    char* str_copy = strdup(score_str);
    int count = 0;
    token = strtok(str_copy, " ");
    while (token != NULL){
        for(int i=0; i<strlen(token); i++){
            if(!isdigit(token[i])){
                free(str_copy);
                return 0;
            }
        }
        if(count < n){
            scores[count] = atoi(token);
            count++;
        }
        token = strtok(NULL, " ");
    }
    free(str_copy);
    return count == n;
}
void sort_scores(int* scores, int n){
    for(int i = 0; i < n - 1; i++){
        for(int i = 0; i < n - i - 1; i++){
            if(scores[i] > scores[i+1]){
                int temp = scores[j];
                scores[j] = scores[j+1];
                scores[j+1] = temp;
            }
    }
}
int main(){
    int n; 
    char score_str[500];
    if(scanf("%d", &n) != 1 || n < 1 || n > 100){
        printf("Invalid input\n");
        return 1;
    }
    getchar();
    if(fgets(score_str, sizeof(score_str), stdin) == NULL){
    printf("Invalid input\n");
        return 1;
    }
    int scores;
    if(!read_and_validate_scores(score_str, n, scores)){
    printf("Invalid input\n");
        return 1;
    }
    sort_scores(scores, n);
     for(int i = 0; i < n; i++){
         printf("%d ", scores[i]);
     }
     printf("\n");
     return 0;
    
    
    
    
    
    
    
    
}