a=20#初始值
for i in str:
    if str.count(i)<=a:
        a=str.count(i)#更新最小值
    else:
        continue
for i in str:
    if str.count(i)==a:
        str=str.replace(i,'')
print(str)