#include <iostream>
#include <unordered_map>
// #include <vector>
using namespace std;
int main(){
string s;
cin>>s;
unordered_map<char,int> count; // 记录字符出现的次数
for(auto &ch: s){
count[ch]++;
}
for(auto &ele: s){
auto it = count.find(ele);
if(it != count.end() && it->second == 1){
// 找到了
cout<<it->first<<endl;
return 0;
}
}
// 走完循环退出输出-1
cout<<-1<<endl;
return 0;
}

京公网安备 11010502036488号