import java.util.*;
/**
* 找出字符串中第一个只出现一次的字符
*/
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextLine()) {
String str = in.nextLine();
Map<String, Integer> map = new
LinkedHashMap<>(); // 利用LinkedHashMap的特性,查找可以按照插入顺序遍历
// 遍历一遍字符串,找出每种字符串出现的次数,保存在map中
final String[] split = str.split("");
for (String s : split) {
if (map.containsKey(s)) {
map.put(s, map.get(s) + 1);
} else {
map.put(s, 1);
}
}
boolean flag = false; // 找到某个字符串只出现一次的标识
String key = "";
for (Map.Entry<String, Integer> entry : map.entrySet()) {
// 找到第一个就退出循环
if (entry.getValue() == 1) {
flag = true;
key = entry.getKey();
break;
}
}
// 输出结果
System.out.println(flag ? key : "-1");
}
}
}