import java.util.*;
public class Main
{
private int count(String str)
{
Map<Character, Integer> map = new HashMap<>();
for (char ch : str.toCharArray()) {
map.put(ch, map.getOrDefault(ch, 0) + 1);
}
for (char ch : str.toCharArray()) {
if (map.get(ch) == 1) {
return ch;
}
}
return -1;
}
public Main()
{
Scanner in = new Scanner(System.in);
while (in.hasNextLine())
{
String str = in.nextLine();
int result = count(str);
if (result == -1) {
System.out.println(result);
}
else {
System.out.println((char)result);
}
}
}
public static void main(String[] args)
{
Main solution = new Main();
}
}