program hdf;
var
m: array [1 .. 8] of integer;
i: integer;
begin
randomize;
for i := 1 to 8 do
m[i] := (-3) + random(8);
writeln('ISXODNII massiv: ');
for i := 1 to 8 do
write(m[i], ' ');
for i := 1 to 8 do
if m[i] < 0 then
m[i] := m[i] + 10;
writeln;
writeln('PEREDELANII massiv: ');
for i := 1 to 8 do
write(m[i], ' ');
readln;
end.