```while True:
    try:
        s = input()
        tmp = []
        for i in reversed(range(len(s))):
            if s[i] not in tmp:
                tmp.append(s[i])
        print(''.join(tmp))
    except:
        break