Begin with the grammar$:$
$S\rightarrow aAa|bBb|\in$
$A\rightarrow C|a$
$B\rightarrow C|b$
$C\rightarrow CDE|\in$
$D\rightarrow A|B|ab$
- Eliminate $\in-$productions.
- Eliminate any unit productions in the resulting grammar.
- Eliminate any useless symbols in the resulting grammar.
- Put the resulting grammar into Chomsky Normal Form.