#求赞求拯救
import sys

data=sys.stdin.readline()
data=data.strip('\n')
# print(data)
d={}
for c in data:
    if c not in d.keys():
        d[c]=1
    else:
        d[c]=d[c]+1

def get():
    for item in d.keys():
        if d[item]==1:
            # print(item)
            return item
    return -1

print(get())