program RemoveCommonLetters;
function RemoveCommonLetters(word1, word2: string): string;
var
i: Integer;
resultStr: string;
begin
resultStr := '';
for i := 1 to Length(word1) do
begin
if Pos(word1[i], word2) = 0 then
resultStr := resultStr + word1[i];
end;
RemoveCommonLetters := resultStr;
end;
var
word1, word2, result: string;
begin
word1 := 'forest';
word2 := 'tor';
result := RemoveCommonLetters(word1, word2);
WriteLn(result);
end.
(*
run:
fes
*)