number = int(input())
number = str(number)
result =''
for i in number[::-1]:
    if i not in result:
        result += i
print(int(result))