Comments

D was such an interesting problem! I implemented it by brutly calculating if there is way to make the string a palindrome without making it a complete string of a's. If that took more than 25 moves, it would obviously be the wrong choice.