for(x=i=+readline();--x>-i;print())for(y=i;--y>-i;putstr(n>0?n:y<0?"":" "))n=(x>0?-x:x)+(y>0?-y:y)+i