while True: try: s = input() target_list = [] for i in s: if s.count(i) == 1: target_list.append(i) if len(target_list) == 0: print(-1) else: print(target_list[0]) except: break
while True: try: s = input() target_list = [] for i in s: if s.count(i) == 1: target_list.append(i) if len(target_list) == 0: print(-1) else: print(target_list[0]) except: break