a=int(input()) def edge(n,x,y): print(x,end="") for i in range(2,n): print(y,end="") print(x) for i in range(1,a+1): if i == 1 or i == a: edge(a,"*","*") else: edge(a,"*"," ")