program lab10;
var 
M: set of char;
c: char;
begin 
writeln('Please enter symbols');
M := [];
while not eof do
begin 
read(c);
if (c in ['f'..'m']) or (c in ['+','-','*','/']) then 
M := M + [c];
end;
writeln('Result:');
for c := 'f' to 'm' do
  if c in M then
    write(c, ' ');
if '+' in M then write('+ '); 
if '-' in M then write('- ');
if '*' in M then write('* ');
if '/' in M then write('/ ');
writeln;
end.
