Implementing an RDP with backtracking to check if strings (of type aaaa or aaaaaa) can be parsed by the grammar: S-> aSa | aa