import sys

for line in sys.stdin:
    a = list(line.rstrip())
    outword=""
    uniq= set(a)
    dict1={}
    for i in uniq:
        dict1[i]=a.count(i)
    for i in a:
        if dict1[i] == sorted(dict1.values(),key=int)[0]:
            pass
        else:
            outword+=i 
    print(outword)

set和dict都是无序的。