#print(int(set(input())[::-1])) #此处为什么能不能用set去重? c = input()[::-1] #为什么要先颠倒顺序,再去重? res = '' for i in c: if i not in res: res += i print(int(res))