const H = ['z','x','c']; ....................... function ggg(s:string):string; var i:integer; begin Result:=''; for I := 1 to Length(s) do begin if s[i] in H then Result:=Result+s[i]; end; end;