'''
解题思路:
反序,采用not in方法确认不重复,逐个复制,
'''
S = input()
S = S[::-1]
T = ''
for s in S:
    if s not in T:
        T = T+s
print(T)