length = int(input())
shape = ""
for n in range(1, length + 1):
for m in range(1, length + 1):
sides = n == 1 or n == length or m == 1 or m == length
diagonal = n == m or n == length - m + 1
if sides or diagonal:
shape += "*"
else:
shape += " "
else:
if n != length:
shape += "\n"
else:
print(shape)