G = ({S, A}, {a, b}, P, S) P : S -> a A A -> a | b | a A | b A