program mn;
uses crt;
var c:set of 'a'..'z';
s:string;
i,j,sc:integer;
BEGIN ClrScr;
Write('stroka:');
readln(s);
for i:=1 to length(s) do begin sc:=1;
if not (s[i] in c) then for j:=i+1 to length(s) do if s[i]=s[j] then inc(sc);
c:=c+[s[i]];
if sc>=2 then write(s[i],' ');
end;
readln;
END.