Var
i,s:integer;
a:array [1..12] of integer;
begin
randomize;
s:=0;
for i:=1 to 12 do
begin
a[i]:=Random(35)+10;
writeln(a[i]);
if a[i] mod 3=0
then s:=s+a[i];
end;
writeln(s);
end.
Var
a,b,c,d,x:integer;
begin
read(a,b,c,d);
for x:= a to b do
if x mod d = c then
write(x,' ');
end.