question here is my_solution
My approach I have replaced vertices given in query with their immediate parent and then checked if the nodes in the sequence are child of each other....
My code has failed on 100th testcase that's only I am asking for help