Mahmoud and a xor trip

CodeForces - 766E