XOR Circuit - Graph Problem , How to solve it?

Problem: https://www.codechef.com/COZI2019/problems/DAGXOR
I can’t find any editorial for this problem.
Can someone provide a solution to this problem ?