n = int(input())
for i in range(1,n+1) :
if i == 1 or i == n :
print("*" * n)
elif i == 2 :
print("*" * i + " " * (n-3) + "*" )
elif i == n-1 :
print("*" + " " * (n-3) + "*" * 2)
else :
print("*" + " " * (i-2) + "*" + " " * (n-i-1) + "*" )