A -> Ba | Aa | c B -> Bb | Ab | d