var
s: string;
b: byte;
i,count: integer;
begin
s := 'aaaaaaarteeemmmm';
for b := 1 to 255 do begin
for i:= 1 to length(s) do
if s[i] = chr(b) then
inc(count);
for i:= 1 to count - 1 do begin
if (count>=2) then
delete(s,pos(chr(b),s),1);
end;
count := 0;
end;
writeln(s);
readln
end.