Either I misunderstood the wues or something I misses…I tried if any node which can be visited via 2 and should not via 1 as vis=true.Then again I tried with 1 that all children of 1 to be visited so that connected components can be taken only and only those children of 1 which are not visited by 2
only 2 test cases passed