#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; int main(){ string A; cin>>A; int lenA=A.size(); string revA=A; reverse(revA.begin(),revA.end()); auto check=[](const string &S){ int p=0,q=S.size()-1; while(p=0;i--){ string tmpA=A.substr(0,lenA-i); reverse(tmpA.begin(),tmpA.end()); string cand=A+tmpA; if(check(cand)){ cout<