#include<bits/stdc++.h>
using namespace std;

const int maxn=1e5+5;
char solve[maxn]={0};

int main()
{

    while( cin.getline(solve,maxn) )
    {
        int Len=strlen( solve );
        map<char,int> mp;
        for(int i=0; i<Len; ++i)
        {
            mp[ solve[i] ]++;
        }

        int tag=1;
        for(int i=0; i<Len; ++i)
        {
            if( 1==mp[ solve[i] ] )
            {
                tag=0;
                printf("%c\n",solve[i] );
                break;
            }
        }

        if( tag )
        {
            printf("-1\n");
        }

        //memset( solve, 0, sizeof(solve) );
    }


    return 0;
}