1(0)->a->2 2(0)->$->3 3(1)->$->1 3(1)