I was solving this problem 2069D\ - Palindrome Shuffle. It is giving me Runtime error on test 2. My idea to solve this problem is to first know how many chars from the beginning of the string equal chars from the end, so these chars don't have to be swapped with any other char. Then in the rest of the string I should use suffix or prefix of the string to make it palindrome. To calculate the answer to the problem, it is just the max distance between the end of the string and a char I used to do the swap. My code is in the spoiler.
Spoiler