n=1 while~9+n:p='%2d+'*n;print' '*3*(9-n)+(p+'%2d='+p)[:-1]%tuple(range(n*n,~n*~n));n+=1