var
k,i:integer;
begin
write('Введите k: ');
readln(k);
for i:=3 to k do
if i mod 3 = 0 then
write(i);
if (i<>k) and (i<>k-1) and (i<>k-2)
then
write(', ');
end;
end.
var
k,i:integer;
begin
write('Введите k: ');
readln(k);
for i:=3 to k do
if i mod 3 = 0 then
begin
write(i);
if (i<>k) and (i<>k-1) and (i<>k-2)
then
write(', ');
end;
end.