L[99],S[99],v[99],e,s,p,m,x;f(i){v[i]||(v[i]=p,x+=m=L[i],v[s=S[i]]==p?e=s:f(s));L[i]