#include using namespace std; int main(){ string s,res; int temp{0},temp2=numeric_limits::max(); cin >> s; int len=s.size(); bool flag=false; for(int i=0; itemp){ temp2=temp; flag=true; } } } } } cout << (flag?temp2:-1) << endl; return 0; }