Artokhlam#5452

Artokhlam

1 second
64 megabytes
Easy

Malhotra, Arthochlam, Malhotra!

Boy Akim

Once upon a time, a boy named Akim from class D' found a printout of the Malhotra-Kumar-Maheshwari article in the fourth compartment. Naturally, the article was in Hindi. He carried it with him through the pouring rain and, in the evening, read it aloud to his friends.

His friends did not understand anything, and the most skeptical among them even hypothesized that the following could have happened: one of the pages (let's call it page number ) got soaked, and its contents imprinted, first on the reverse side (that is, page number p + 1) in a mirrored form, and then on the next page (that is, page number p + 2).

To test this hypothesis, the students of class D' have asked you to find the longest substring in Akim's speech notes that can be represented in the form \alpha\alpha^r\alpha, where is some string, and \alpha^r is the reverse of .

Input

The input file contains a string — Akim's speech notes. The string consists only of characters with ASCII codes from to (inclusive), and its length does not exceed characters.

Output

In the output file, print the longest substring of of the form \alpha \alpha^r \alpha. If there are multiple solutions, you may print any one of them. If the answer is an empty string, print None (without quotes).

Examples

Example 1

Loading
Loading