while 1:b=a=int(input()*2+1);exec"i=a-b+1%b;b-=1;print'0 '*i+`i*b`+' 0'*~-b;"*a