s = input() num = [] for i in s: n = s.count(i) num.append(n) if n == 1: print(i) break if 1 not in num: print(-1)