The perfect party#2703

The perfect party

1 second
64 megabytes
Very easy

As you may recall, the mesklenits set out on an expedition. Once, the leader needed to send a special squad for reconnaissance, consisting of the best mesklenits. To do this, he lined up the whole team in a row.

The color of each mesklenit's shell is represented by an uppercase Latin letter ( to ). To save time, the leader decided to pick several consecutive members from the row. Additionally, he considered that reconnaissance would be more successful if the selected squad is symmetric with respect to their shell colors. For example, the squad is symmetric, whereas is not.

You need to pick the largest possible squad of mesklenits from the row that satisfies these conditions.

Input

The input is a string of no more than characters, denoting the shell colors of the mesklenits in the row.

Output

Output the string corresponding to the chosen squad of mesklenits. If there are several possible answers, output the one closer to the start of the row.

Examples

Example 1

Loading
Loading