#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
const int maxn = 110005;
int p[maxn*2+100];
char s[maxn];
void manacher()
{
string t = "$";
int n =strlen(s);
for(int i=0;i<n;i++){ //变为奇数字符串
t+="#";
t+=s[i];
}
t+="#@";
int id=0,mx=0,maxlen=-1,index=0; //maxlen最大回文串长度,index最大回文串中心
for(int j=1;j<t.length()-1;j++){
p[j] = mx>j?min(p[2*id-j],mx-j):1;
while(t[j+p[j]]==t[j-p[j]]) p[j]++;
if(mx<p[j]+j){
mx=p[j]+j;
id=j;
}
if(maxlen<p[j]-1){
maxlen=p[j]-1;
index=j;
}
}
int start = (index - maxlen) / 2; //起点
int en = start + maxlen; //终点
}
int main()
{
while(~scanf("%s",s))
manacher();
return 0;
}