type
TCharset = Set of ['0'..'9'];
PCharset = ^TCharset;
var p:PCharset;
s:string;
i:Integer;
c:Char;
begin
write('s=');
readln(s);
new(p);
p^ := [];
for i:=1 to Length(s) do begin
c := s[i];
if (c>='0')and(c<='9') then Include(p^, c);
end;
for c:='0' to '9' do begin
if (c in p^) then write(c);
end;
dispose(p);
end.