Y found two papers and a pencil in his room (It's so valuable for a prisoner). a weighted tree is drawn on the first paper and intialy is written on the second paper.
He will do following operation for all nonempty matchings of the tree drawn on the first paper:
What is the number written on the second paper after Y has done all operations?
Input
First line contains only , number of tree's vertices.
Each of following lines contains and separated space describing tree's th edge's vertices() and its weight ().
It is guaranteed that the edges form a tree.
Output
The only line of output contains an integer, the number written on the second paper after Y has done all operations.
There is two nonempty matching which xor of their edge's weights are and so answer is .