a = input() freq = {} index = 0 for i in set(a): freq[i] = a.count(i) for i in a: if freq[i] == 1: print(i) index += 1 break if index == 0: print(-1)