for line in sys.stdin: a = line.split() # print(a[0]) raw_data = list(a[0])
for i in raw_data: if i notin less_dict.keys(): less_dict[i] = 1 else: less_dict[i] += 1
# print(less_dict) # 在字典内 找出最小的几个。 temp = [] for key,value in less_dict.items(): if temp == []: temp.append((key,value)) last_value = value else: if value < last_value: temp.pop() temp.append((key,value)) last_value = value elif value == last_value: temp.append((key,value)) # print(temp) # print(temp) small_str = ''.join([ _[0] for _ in temp]) # print(small_str,'ok')
i ,result = 0,[] for i inrange(len(raw_data)): if raw_data[i] notin small_str: result.append(raw_data[i]) print(''.join(result))