A palindrome is a string that reads the same left to right and right to left. For example, 1001 is a palindrome, but 1010 is not. Write a program that converts any string consisting only of 0 and 1 into a palindrome by adding the minimum number of new characters. You may insert the new characters at the beginning, end, or anywhere inside the string.
The input consists of a string of length at most characters, containing only 0 and 1.
On the first line, output the number of characters added. On the second line, output the resulting palindrome. If several answers are possible, output the lexicographically smallest one.
Example 1