Solution (source code)

= Solution

This language is context-free. It is the language of <context-free grammar for even palindromes>[even-length palindromes] over $\{a,b\}$, generated by the <context-free grammar>
$$
S\to aSa\mid bSb\mid\epsilon.
$$
Every derivation adds matching outer symbols, and removing the matching first and last symbols gives the converse induction.