/*毫无技术可言,遍历每个字符出现的次数,为1便输出该字符,停止*/
#include <bits/stdc++.h>
using namespace std;
int main ()
{
    string str;  cin>>str; 
    int stopflag = 0;
    for(int i = 0; i<str.length() && stopflag==0; i++)
    {
        if( count(str.begin(),str.end(),str[i]) == 1 ) 
        {
            cout<<str[i];
            stopflag = 1;
        }
    }
    
    if(stopflag == 0)
        cout << -1;
    return 0;
}