#include <iostream>
using namespace std;
int main()
{
string str;
while (getline(cin, str))
{
int a[128] = {0}, slen = str.size();
char s;
for (int i = 0; i < slen; i++)a[str[i]] ++;
for (int i = 0; i < slen; i++)
if (a[str[i]] == 1){s = str[i];break;}
if (s != NULL)cout << s << endl;
else cout << -1 << endl;
}
}