S → CD | DE B → b | bB C → c | cC D → dC E → eD | De H → gE | EgNow in the set of accessible nonterminals, we may first include S, then C and D and E. No other nonterminals are accessible, so the final grammar has productions
S → CD | DE C → c | cC D → dC E → eD | De