Var
a:array[1..12] of integer;
i:integer;
begin
for i:=1 to 12 do
begin
a[i]:=random(45)+9;
write(a[i]," ");
end;
writeln();
for i:=1 to 12 do
begin
if ((a[i] mod 3)=0) and ((i mod 2)=0) then
a[i]:=a[i]+5;
if ((a[i] mod 3)=0) then
a[i]:=a[i]+5;
write(a[i]," ");
end;
end