Given a string, perform the following operation: append to it the same string written in reverse order. Repeat this operation with the resulting string as many times as possible.
Given the final string produced by several such operations, determine the initial string and the maximal number of times the operation was performed.
A single line containing the result string after several operations. The length of the string does not exceed 10^6.
Print the initial string on the first line. On the second line, print the maximal number of operations performed.
Example 1