Var a:array [1..8,1..8] of integer;
j,k,n:integer;
begin
randomize;
for j:=1 to 8 do
begin
for k:=1 to 8 do
begin
a[j,k]:=random(9)+1;
write (a[j,k]:2);
end;
writeln;
end;
repeat
write ('N = ');
readln (n);
until n in [1..8];
for j:=1 to 8 do write (a[n,j]:3);
writeln;
readln;
end.