def generate_pattern(n):
if n % 2 == 0:
return
for i in range(n):
for j in range(n):
# Conditions for printing '*'
if i == 0 or i == n - 1 or j == 0 or j == n - 1 or i == j or i + j == n - 1:
print('*', end='')
else:
print(' ', end='')
print()
# Example usage
n = int(input())
generate_pattern(n)