import sys
while True:
    try:
        s = input()
        dic = {}
        for c in s:
            dic[c] = s.count(c)
        #按次数排序
        ss = sorted(s, key = lambda x: dic[x])
        min_count = dic[ss[0]]
        #把等于最小次数的字符删掉
        for c in ss:
            if dic[c] == min_count:
                s = s.replace(c, '')
            else:
                break
        print(s)
    except:
#         print(sys.exc_info())
        break