~~~
for i in range(101):
t = int(input())
if t == 0:
break
else:
for i in range(t):
for j in range(t):
x = min(i, t - 1 - i, j, t - 1 - j)
print(x + 1,end = ‘ ‘)
print()
print()