#字符串先逆序
#没放进输出结果里的,就添加,已经放过的,就不处理
import sys
while True:
    try:
        n = input()
        res = ""
        for c in n[::-1]:
            if c not in res:
                res += c
        print(res)
    except:
#         print(sys.exc_info())
        break