$program thay_the_cum_tu;$
$var vt: byte;$
$St: string;$
$Begin$
$write(’Nhap vao mot xau: ');$
$readln(st);$
$while pos ('anh', st)<>0 $
$begin$
$Vt : = pos ( ' anh ' , St. : ; delete(St,vt,3);$
$insert('em',St,vt) ; end;$
$write ('Xau sau khi da duoc thay the: ' ,st ,')$
$readln$
$end.$