//这个题跟前面一道题重复了
#include <stdio.h>
int main() {
    int arr[100] = { 0 };
    int temp = 0;
    int n = 0, i = 0, j = 0, m = 0;
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
        scanf("%d ", &arr[i]);
    }
    scanf("%d", &m);
    arr[n] = m;
    for (i = n - 1; i >= 0; i--) {
        if (arr[i + 1] < arr[i]) {
            temp = arr[i + 1];
            arr[i + 1] = arr[i];
            arr[i] = temp;
        }
    }
    for (i = 0; i < n + 1; i++) {
        printf("%d ", arr[i]);
    }
    return 0;
}