#include<iostream> #include<algorithm> #include<cstring> using namespace std; const int maxn=110010; char t[maxn],s[maxn*3]; int p[maxn*3],lens; void init() { memset(s,'