# hashmap解法:分组计数,排除掉最小值的字母
# 时间:单次循环O(n).空间:k个哈希表字符,l个字符存在res,所以O(k+l)
while True:
try:
str1=input()
hashmap,res={},""
for i in str1:
if i not in hashmap:
hashmap[i]=1
else:
hashmap[i]+=1
min_value=min(hashmap.values())
for i in str1:
if hashmap[i] != min_value:
res+=i
print(res)
except:
break