while(line = readline()) {
const arr = line.split('');
let result = arr.reduce((temp, data) => {
temp[data] = temp[data] ? temp[data] + 1 : 1;
return temp;
}, {})
let status = false;
for (let index in result) {
if (result[index] == 1) {
status = true;
print(index);
break;
}
}
if (!status) {
print(-1);
}
}