ls = list(input())[::-1] # 输入变列表再倒序 ls1 = list(set(ls)) # 去重 ls1.sort(key=ls.index) # 按输入的书序排序 print("".join(ls1)) # 连接列表中的字符