G ::= S
S ::= A M
A ::= a E | b A A
M ::= S | ϵ
E ::= a B | b A | ϵ
B ::= b E | a B B
where a and b are terminals
So I tried to do a derivation for this but I realized there's no point where you're left with just terminal variables? How do describe the grammar if it continuously goes in loops?