Const n = 5;
var a: array[1..n, 1..n] of byte;
i, j: integer;
begin
for i := 1 to n do
for j := 1 to n do
begin
if (abs(i - j) = 3) or ((abs(i - j) = 1) and ((i = 1) or (j = 1) or (i=5) or (j=5))) then
a[i, j] := 0
else a[i, j] := 1;
end;
for i := 1 to n do
begin
for j := 1 to n do
write(a[i, j]);
writeln;
end;
end.