x = int(input())
z = x
i = x
ii = x
n_2 = x - 2
while i > 0:
print("*",end="")
i -= 1
print("\n", end="")
while n_2 > 0:
j = x
while j > 0:
if j == z or j == 1:
print("*", end='')
else:
print(" ", end='')
j -= 1
print("\n", end="")
n_2 -= 1
while ii > 0:
print("*",end="")
ii -= 1