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

int main() {
    string s;
    while (cin >> s) {
        int m = s.size();

        vector<char> arr;
        map<char, int> dict;


        for (int i = 0; i < m; i++) {
            dict[s[i]]++;
            if (find(arr.begin(), arr.end(), s[i]) == arr.end())
                arr.push_back(s[i]);
        }

        int ret = -1;
        char c;

        for (auto i : arr) {
            if (dict[i] == 1) {
                c = i;
                ret = i;
                break;
            }
        }

        if (ret == -1) {
            cout << -1 << endl;
        } else {
            cout << c << endl;
        }


    }

}
// 64 位输出请用 printf("%lld")