A -> a A A -> a B B -> B -> b