n = int(input())

for i in range(n):
    if i == 0 or i == n-1:
        print('*' * n)
    else:
        x = ['*'] + [' '] * (n-2) + ['*']
        x[i] = "*"
        x[n-i-1] = "*"
        print(*x, sep='')