s = input() dic = [] for i in range(1, len(s)+1): n = s[-i] if n not in dic: dic.append(n) print(n, end='')