str = input() re_str = str[::-1] str0 = "" for i in range(0, len(re_str)): str11 = re_str[i:i+1:1] if str0.find(str11) == -1: str0 = str0 + str11 i += 1 print(str0)