str1 = input()

res = '-1' # 初始化为-1
for i in str1:
    if str1.count(i) == 1:  # 按顺序遍历,找到第一个个数等于1的
        res = i
        break

print(res)