var i,j,k,n:integer;
begin
write('N='); readln(n);
for i:=1 to n do
begin
write('':n-i);
for j:=1 to i do write(j);
for j:=i-1 downto 1 do write(j);
writeln;
end;
for i:=n-1 downto 1 do
begin
write('':n-i);
for j:=1 to i do write(j);
for j:=i-1 downto 1 do write(j);
writeln;
end;
end.
var nimqiquyj4k:integer;procedure shuchu(k:integer); var i:integer;begin for i:=1 to n-k do write(' ');for i:=1 to k do write(i);for i:=k-1 downto 1 do write(i);writeln;end;begin readln(n); for k:=1 to n do shuchu(k); for k:=n-1 downto 1 do shuchu(k);end.