At the end of each step, C is increased by one.
in each step, C points to one letter of the word that we call this letter L.  At first step, first pointer P1 finds one edge between root edges that its letter is equal with L. P1 goes down on tree by that edge.