Figure 12.24 shows a state diagram of an asynchronous circuit with two inputs, R and P, and a single output, Q. The input values are shown on the arcs; the state names and the output values of the stable states are shown in the circles. Design an asynchronous circuit to implement this function.