public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String str = sc.next();
Map<Character, Integer> map = new LinkedHashMap<>();
for (int i = 0; i < str.length(); i++) {
if(map.containsKey(str.charAt(i))){
map.put(str.charAt(i),map.get(str.charAt(i)) + 1);
}else{
map.put(str.charAt(i), 1);
}
}
char ch = 0;
for(Map.Entry<Character,Integer> entry : map.entrySet()){
if(entry.getValue() == 1){
ch = entry.getKey();
break;
}
}
if(ch == 0){
System.out.println(-1);
}else{
System.out.println(ch);
}
}
}
}