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