num = input() ls = [] for i in reversed(num): # reversed(seq),返回一个反转的迭代器。 if i not in ls: ls.append(i) print(''.join(ls))