// editor3
#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);

    // Check constraints
    if (n < 1 || n > 10) {
        printf("Invalid Input\n");
        return 0;
    }

    // Upper half
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n - i; j++) {
            printf(" ");
        }
        for (int j = 1; j <= i; j++) {
            printf("*");
        }
        printf("\n");
    }

    // Lower half
    for (int i = n - 1; i >= 1; i--) {
        for (int j = 1; j <= n - i; j++) {
            printf(" ");
        }
        for (int j = 1; j <= i; j++) {
            printf("*");
        }
        printf("\n");
    }

    return 0;
}

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main() {
    char str[105];
    fgets(str, sizeof(str), stdin);   // Read input string
    
    int len = strlen(str);
    if (str[len - 1] == '\n') {
        str[len - 1] = '\0';  // remove newline from fgets
        len--;
    }

    // Check for invalid characters (anything not letter, digit, or space)
    for (int i = 0; i < len; i++) {
        if (!(isalnum(str[i]) || str[i] == ' ')) {
            printf("Invalid input\n");
            return 0;
        }
    }

    // Remove duplicates while keeping order
    int visited[256] = {0};  // track ASCII characters
    for (int i = 0; i < len; i++) {
        unsigned char c = str[i];
        if (!visited[c]) {
            printf("%c", c);
            visited[c] = 1;
        }
    }
    printf("\n");

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

struct Node {
    int data;
    struct Node* prev;
    struct Node* next;
};

struct Node* createNode(int data) {
    struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
    if (!newNode) return NULL;
    newNode->data = data;
    newNode->prev = newNode->next = NULL;
    return newNode;
}

int main() {
    int n;
    if (scanf("%d", &n) != 1 || n <= 0 || n > 10) {
        printf("Invalid input\n");
        return 0;
    }

    struct Node* head = NULL;
    struct Node* tail = NULL;

    for (int i = 0; i < n; i++) {
        int val;
        if (scanf("%d", &val) != 1 || val < -10000 || val > 10000) {
            printf("Invalid input\n");
            return 0;
        }

        struct Node* newNode = createNode(val);
        if (!head) {
            head = tail = newNode;
        } else {
            tail->next = newNode;
            newNode->prev = tail;
            tail = newNode;
        }
    }

    // Print list
    struct Node* temp = head;
    while (temp) {
        printf("%d", temp->data);
        if (temp->next) printf(" ");
        temp = temp->next;
    }
    printf("\n");

    return 0;
}