import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s = in.next();
boolean flag = false;
Map<Character,Integer> lhm = new LinkedHashMap<>();
//统计字符出现的次数,并按照顺序插入
for(int i = 0; i<s.length(); i++){
if(!lhm.containsKey(s.charAt(i))){
lhm.put(s.charAt(i),1);
}else{
lhm.put(s.charAt(i),lhm.get(s.charAt(i))+1);
}
}
//遍历哈希表,第一次出现value == 1则打印
for(Map.Entry<Character,Integer> me : lhm.entrySet()){
if(me.getValue() == 1){
flag = true;
System.out.print(me.getKey());
break;
}
}
//没有重复出现的字符打印-1
if(!flag){
System.out.print(-1);
}
}
}