n = input().strip()
result = int(''.join(dict.fromkeys(n[::-1]).keys()))
print(result)