Problems
The perfect party
The perfect party
As you may recall, went on an expedition mesklenity. Once leader of the expedition needed to send a special unit for the exploration, consisting of the best mesklenitov. To do this, he built the whole team in a row.
The color of each shell is denoted mesklenita capital Latin letters (\textbf{A} through \textbf{Z}). To save time, going head to choose from several consecutive rows of standing. In addition, he believes that the exploration will be more successful if the selected squad will be symmetric in the color of shells. For example, the unit will \textbf{RGBGR} symmetrical, and squad \textbf{RGRB} - no.
You must select from the ranks of the greatest possible mesklenitov group, which meets these conditions.
\InputFile
Given a string whose length does not exceed \textbf{255} characters - mesklenitov color in the ranks.
\OutputFile
Output is a string - the chosen squad mesklenitov. If several possible answers, we need to bring closer to the top of the line.
Input example #1
ABAC
Output example #1
ABA