Unique number 2 soln

how to solve unique number 2 problem of bitmasking?

Unique number 2 problem is different from Unique number 1.
Here also you have to take xor of all the numbers, but thats not the answer here.

hint: Count the position of any one set bit in the XOR, and make a mask