#include <stdio.h>

int main() {
    char input[1001];
    while (scanf("%s", input) != EOF) { 
        int freq[26] = {0};
        for(int i = 0; input[i] != '\0'; i++) {
            freq[input[i] - 'a']++;
        } 
        int flag = 0;
        for(int i = 0; input[i] != '\0'; i++) {
            if(freq[input[i] - 'a'] == 1) {
                printf("%c\n", input[i]);
                flag = 1;
                break;
            }
        }
        if(flag != 1) printf("-1\n");
    }
    return 0;
}