Palindrome Game (hard version)

Problem Name:
Palindrome Game (hard version)
Site:CodeForces
Links:
Tags:
Problem setters: