import sys a = sys.stdin.readline().strip() b = "" for i in a[::-1]: if i in b: pass else: b = b + i print(b)