A function to move from u to v keeping track of the maximum we move to the surface changing u and chains until u and v donot belong to the same
int crawl_tree ( int u , int v , int n , int chain_heads [ ] ) { int chain_u , chain_v = node [ v ] . chain , ans = 0 ; while ( true ) { chain_u = node [ u ] . chain ;