while True:
    try:
        a = list(input())
        c = a[::-1]
        #c = list(map(int,d))
        b = ''
        for i in c:
            if i not in b:
                b = b + i
        print(b)
    except:
        break