str1 = input()
data = {}
for i in str1:
    if str1.count(i) == 1:
        print(i)
        break
else:
    print(-1)