#include using namespace std; using ll=long long; int main(){ string s; cin>>s; ll n=s.size(); bool ok=true; for(ll i=0;i