#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    string str;
    cin >> str;
    int len = str.size();
    int addr[128] = {0};
    char first_s;//记录 第一个只出现一次的字符

    
    for(int i = 0; i < len; i++)
    {
        addr[str[i]]++;
    }
    
    for(int i = 0; i < len; i++){
        if(addr[str[i]] == 1)
        {
            first_s = str[i];
            break;//跳出循环,避免重复赋值
        }   
    }
    
    if(first_s != NULL){
        cout << first_s <<endl;
    }
    else{
        cout << -1 <<endl;
    }
    
    return 0;
}