let str;
while(str = readline()){
  let res = -1;
  for(let i=0;i<str.length;i++){
    let reg = new RegExp(`${str[i]}`,'g');
    if(str.match(reg).length == 1){
      res = str[i];
      break;
    }
  }
  console.log(res)

}