Lucifer traps Sam and Dean and locks them in Hell. To get out of Hell a pass key is required which was unknown to them. They found structure on a wall which contain N nodes which were connected to each other through N-1 edges such that there exist a path between any two nodes. Each pair of connection was assigned some weight.
Some other prisoners in hell told them that the pass key to get out is hidden in this structure. Prisoners told them that they need to find two distinct node U and V such that Xor-Sum of all weights present in the path of U to V is maximum. If more than one pair exists such that the Xor-Sum is maximum than U and V should be lexicographically smallest.
Since there are 3 nodes hence we can select two nodes in following way
(1,2) Xor-sum = 1 (2,3) Xor-sum = 2 (1,3) Xor-sum = 1 Xor 2 = 3 Hence maximum xor is 3 and path from node 1 to node 3 is 1 -> 2 -> 3.