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