while 1:r=range(92);s=raw_input();print max([s[i:j]*(s[i:j]==s[i:j][::-1])for i in r for j in r],key=len)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page