n = list(input()) string = '' for i in reversed(range(len(n))): if n[i] not in string: string += n[i] print(int(string))