const a=10;
var xxx,yy,z,k;
begin
  k:=1;
  display(400);
  while 1=1 do begin
    color(k);
    k:=k+1;
    if k=5 then k:=1;
    xxx:=400;
    yy:=400;
  while xxx>0 do begin
    z:=10;
    while z>0 do begin
      draw(xxx,yy);
      draw(xxx+1,yy);
      draw(xxx,yy+1);
      draw(xxx+1,yy+1);
      yy:=yy-1; xxx:=xxx-1;
      z:=z-1;
    end;
    xxx:=xxx+10; yy:=yy+10;
      erase(xxx,yy);
      erase(xxx+1,yy);
      erase(xxx,yy+1);
      erase(xxx+1,yy+1);
      yy:=yy-1; xxx:=xxx-1;
  end;
  end;
end.
