def draw_diagonal_square(size):
    if size < 1:
        return

    for i in range(size):
        for j in range(size):
            if i == 0 or i == size - 1 or j == 0 or j == size - 1 or i == j or i == size - j - 1:
                print("*", end="")
            else:
                print(" ", end="")
        print()

# دریافت ورودی از کاربر
size = int(input())
draw_diagonal_square(size)