type FC=file of char;
  var f:FC;
procedure  firsts (var f:FC);
var c:char;
    a:array[1..270] of char;
    m:set of char;
    i:integer;
begin
reset(f);
m:=[];
i:=0;
while not eof(f) do
begin
read(f,c);
if not(c in m) then
  begin
  i:=i+1;
  m:=m+[c];
  a[i]:=c;
  end;
end;
rewrite(f);
for i:=1 to i do
write(f,a[i]);
close(f);
end;



begin
assign(f,'c:\test.txt');
reset(f);
if eof(f) then writeln(' empty ')
   else  firsts(f);
end.