#include #include #include typedef long long LL; const LL mod=19260817; char str[10005]; LL a,b,inv_b; LL gcd(LL a,LL b) { return b==0?a:gcd(b,a%b); } LL pow(LL a,int n) { LL res=1; for(;n>0;n>>=1) { if(n&1) res=res*a%mod; a=a*a%mod; } return res; } int main() { scanf("%s",str); int len=strlen(str); for(int i=0;i