Pog plays a game with szh and this time he finds another tree, this tree is different from the previous one, all nodes of which have a weight! And the weight of the $i-th$ node is $a_i$.
Pog and Szh choose two different nodes on the tree, then pog walks to szh along the paths of the tree and records the weight. Because of too many nodes, pog only records the XOR of all weight of the nodes he passes for convenient.Due to szh's love for pog,szh wanders the sum of which pog records for any $n*(n-1)$ different combinations.
Because of tired of szh's corny pursuit, pog changes $a_A$ into $B$ at every moment, of course, szh must output the answer of all moment.