Need help in question Aviroop and XOR Graph (XORGRAPH)

Question Link XORPATH Problem - CodeChef
I am getting the wrong answer in this question. Here is my submission https://www.codechef.com/viewsolution/34875073

This question is almost the same as this question except for the query part.
https://codeforces.com/contest/845/problem/G

I am able to get the AC in this question. This code should also work in this question as well but I am getting WA. Can you please help me where I might be wrong here?
@aviroop123

2 Likes

Same

WA in here CodeChef: Practical coding for everyone and almost the same code AC here Submission #85525670 - Codeforces .