Solution (source code)

= Solution

The three year states are <transient states>: from each there is positive probability of entering an absorbing state, and repeated trials make eventual departure certain because $q<1$. The singleton classes $\{L\}$ and $\{G\}$ are closed <absorbing states>, hence recurrent. Thus the chain has two closed recurrent classes and three transient singleton classes.