num = int(input())
ans = 0
s = set()
while num != 0:
    if (num % 10) not in s:
        ans = ans * 10 + num % 10
    s.add(num % 10)
    num //= 10
print(ans)