n=int(input())
i=0
j=0
while i<n:
    for j in range(n):
        if i==0 or i ==n-1 or j ==0 or j==n-1 or i+j==n-1 or i==j:
            print('*',end='')
        else:
            print(' ',end='')
    i+=1
    print()