str1 = input()
count = []
for i in str1:
    if str1.count(i) == 1:
        print(i)
        count.append("1")
        break
    else:
        count.append(str1.count(i))
if "1" not in count:
    print(-1)