** S ------> 0 S 1 --------- 1**

** / 0 1 --------- 2**

Handle for** 000111 **is 00S11 [2] --> 0S1 [1] --> S [1] Thus handle is 2,1,1

Similarly for b.

**S ----->S S + ---- 1**

** / SS * ---- 2**

** / a ---- 3**

Handle for **SSS + a * + **is S(S)a*+ [1] --> SS(S)*+ [3] ---> S(S)+ [2] --> S [1]

Similarly for b.