n=y=input() while y:print' '.join('%3i'%((~y-x*2)%n*n+(~y-x-n/2)%n+1)for x in range(n));y-=1