Program mn_9;
uses crt;
type
let = 'a' .. 'z';
var
mn1, mn2: set of let;
s: string;
c: char;
i: integer;
begin
clrscr;
writeln('введите текст, заканчивающийся точкой');
readln(s);
if s[length(s)] <> '.' then
s := s + '.';
i := 1;
mn1 := [];
mn2 := [];
while s[i] <> '.' do
begin
If s[i] in mn1 then
mn2 := mn2 + [s[i]];
mn1 := mn1 + [s[i]];
i := i + 1;
end;
for c := 'a' to 'z' do
if c in mn2 then
write(c:2);
readln;
end.