x1 = input()
list1 = []
list2 = []
for word in x1[::-1]:
    list1.append(word)

for k in list1:
    if k not in list2:
        list2.append(k)

for k in list2:
    print(k,end = '')