Re: Help.
var
s,s1,s2: string;
i,f,n,m,k,l,p,j,code: longint;
ch:char;
begin
readln(s);
readln(n);
for i:=1 to n do
begin
readln(s2);
if s2[1]='p' then
begin
Val(s2[13],j,code);
Val(s2[15],k,code);
s1:=copy(s,j,k-j+1);
f := 0;
for p:= 1 to length(s1) div 2 do
if s1[p] <> s1[length(s1)-p+1] then
begin
writeln('No');
f := 1;
end;
if f = 0 then
writeln('Yes');
end else
begin
Val(s2[8],m,code);
ch:=s2[10];
delete(s,m,1);
insert(ch, s,m);
end;
end;
end.