import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String str = sc.nextLine();
System.out.println(firstOneStr(str));
}
}
private static String firstOneStr(String str) {
for (int i = 0; i < str.length(); i++) {
String tempStr = str.replaceAll(str.charAt(i) + "", "");
if (str.length() - tempStr.length() == 1) {
return str.charAt(i)+"";
}
}
return "-1";
}
}