str1=input()
r=-1

#学习string.count(substr,start,end)的用法
for x in str1:
    if str1.count(x)==1:
        r=1
        print(x)
        break
if r==-1:
    print(r)