one day Okazaki Tomoya buy tree Furukawa Nagisas birthday the tree strange node tree value the value ith node vi Now Furukawa Nagisa Okazaki Tomoya want play game treelet se path node s node e write sequence value nod path se denote sequence Sse we define value sequence GSse follow Suppose sequence z0z1zl1 l length sequence we define GSsez0k0z1k1zl1kl1 if path se satisfy path se belong Furukawa Nagisa belong Okazaki TomoyaCalculating path easy want play difficult Furukawa Nagisa think path p1p2 p2p3 belong path p1p3 belong also think path p1p2 p2p3 belong Okazaki Tomoya path p1p3 belong Okazaki Tomoya but fact conclusion is not right so Furukawa Nagisa want know triplet p1p2p3 correct conclusion task