var
  n,i,j,l,k : integer;
  a         : array[1..100,1..100] of integer;
begin
   assign(input,'F.in');   reset(input);
   assign(output,'F.out'); rewrite(output);

   read(n);
   l := (n div 2)+1;
   k := 1;
   for i:=l to n do
     begin
       a[i,i] := k*k;
       k := k +2;
     end;

   k := 1;
   for i:=n downto l+1 do
     begin
       for j:=n-k downto n-i+1 do
         a[i,j] := a[i,j+1] - 1;
       k := k + 1;
     end;
   for j:=1 to l-1 do
     for i:=n-j downto j do
       a[i,j] := a[i+1,j]-1;
    for i:=1 to l-1 do
      for j:=i+1 to n-i+1 do
        a[i,j] := a[i,j-1] - 1;
    k := 1;
    for j:=n downto  l+1 do
      begin
        for i:=n-j+2 to n-k do
          a[i,j] := a[i-1,j] - 1;
        k := k+1;
      end;

    for i:=1 to n do
     begin
       for j:=1 to n do
         write(a[i,j],' ');
       writeln;
     end;

   close(input); close(output);
end.