Program a16_46;
uses crt;
const s='wdddkeuupppppmzz';
var t,k:string;
i,j:integer;
BEGIN
clrscr;
j:=0;
t:=s;
writeln(t);
while i   begin
    if t[i]=t[i+1] then
      begin
        j:=j+1;
        while t[i]=t[i+1] do
          i:=i+1;
      end
    else
      i:=i+1;
  end;
writeln('В данно строке ',j,' групп');
readln;
END.