n = input() # 接收输入集 n = n[::-1] # 将输入的字符串进行倒序 opt = '' # 创建空字符串准备接受结果数据 for i in n: # 循环遍历已倒序的字符串 if i not in opt: # 判断每一个字符是否存在 opt += i # 如果不存在则添加进结果 print(int(opt)) # 将结果字符串转换为整数然后打印输出