def get_ans(s):
dic={}
for i in s:
dic[i]=dic.get(i,0)+1
dic1=sorted(dic.items(),key=lambda d:d[1])
mark,ans=dic1[0][1],''
for i in s:
if dic[i]!=mark:
ans+=i
return ans
if __name__=='__main__':
import sys
lines = []
while True:
line = sys.stdin.readline().strip()
if line == "":
break
lines.append(line)
for item in lines:
print(get_ans(item))