import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
Map<Character, Integer> map = new LinkedHashMap<>();
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char c = line.charAt(i);
map.put(c, map.getOrDefault(c, 0) + 1);
}
boolean flag = false;
for (Map.Entry<Character, Integer> entry : map.entrySet()) {
if (entry.getValue() == 1) {
System.out.println(entry.getKey());
flag = true;
break;
}
}
if (!flag) {
System.out.println(-1);
}
}
sc.close();
}
}