import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        char[] chrs = scan.nextLine().toCharArray();
        Queue<Character> queue = new LinkedList<>();
        int[] nums = new int[26];
        for (char chr : chrs) {
            nums[chr - 'a']++;
            if (nums[chr - 'a'] == 1) {
                queue.add(chr);
            }
            if (nums[chr - 'a'] > 1 && queue.contains(chr)) {
                queue.remove(chr);
            }
        }
        if (queue.isEmpty()) {
            System.out.println(-1);
        } else {
            char chr = queue.poll();
            System.out.println(chr);
        }
    }
}