num = input()
num = num[::-1]
y = ''
for i in num:
    if i not in y:
        y = y + i
print(y)

1.将输入的字符串按步长-1取
2.从新字符串中读取,判断是否出现