Introduction - If you have any usage issues, please Google them yourself
The so-called palindrome is read from left to right and from right to left reading is the same string. Now we insert any string, making the new format string is a palindrome. Requirements for a given string into the least number of operations. If Ab3bd, at least through two operations can be inserted palindrome ("dAb3bAd" or "Adb3bdA").
Input contains several examples. Two lines of each case, the first act N, the string length, the second string behavior. N <= 1000. The string value contains 26 uppercase and 26 lowercase letters. Enter N = 0 to end.