uses graphabc,crt;
const t=500;
begin
setwindowsize (600, 600);
setpencolor (clblack);
setbrushcolor (clblack);
rectangle (45, 45, 105, 225 );
setpencolor (clred);
setbrushcolor (clred);
circle (75, 75, 25);
setpencolor (clyellow);
setbrushcolor (clyellow);
circle (75, 130, 25);
setpencolor (clgreen);
setbrushcolor (clgreen);
circle (75, 185, 25);
setpencolor (clblack);
setbrushcolor (clblack);
rectangle (70, 225, 80, 300);
setbrushcolor (clDkGray); circle (75, 130, 25);
setbrushcolor (clgreen); circle (75, 185, 25);
repeat
setbrushcolor (clDkGray); circle (75, 185, 25);
setbrushcolor (clred); circle (75, 75, 25); delay(t);
setbrushcolor (clDkGray); circle (75, 75, 25);
setbrushcolor (clyellow); circle (75, 130, 25); delay(t);
setbrushcolor (clDkGray); circle (75, 130, 25);
setbrushcolor (clgreen); circle (75, 185, 25); delay(t);
until keypressed;
end.