while True:
    try:
        d={}
        n=input()
        for i in n:
            if i in d:
                d[i]+=1
            else:
                d[i]=1
        a=min(d.values())
        for i in n:
            if d[i] == a:
                n=n.replace(i,"")
        print(n)
    except:
        break