Problem: Reading the book "Equations of Mathematical Magic" Roman Oira-Oira and Cristobal Junta found an interesting equation: for some given , where stands for a bitwise exclusive or (XOR) of two integers (this operation is denoted as ^ or xor in many modern programming languages). Oira-Oira quickly found some , which is the solution of the equation, but Cristobal Junta decided that Oira-Oira's result is not interesting enough, so he asked his colleague how many non-negative solutions of this equation exist. This task turned out to be too difficult for Oira-Oira, so he asks you to help.
Input Format: Each test contains several possible values of and your task is to find the number of equation's solution for each of them. The first line contains an integer () — the number of these values.
The following lines contain the values of parameter , each value is an integer from to inclusive.
Output Format: For each value of print exactly one integer — the number of non-negative solutions of the equation for the given value of the parameter. Print answers in the same order as values of appear in the input.
One can show that the number of solutions is always finite.
Note: Let's define the bitwise exclusive OR (XOR) operation. Given two integers and , consider their binary representations (possibly with leading zeroes): and . Here, is the -th bit of the number and is the -th bit of the number . Let be the result of the XOR operation of and . Then is defined as where:
For the first value of the parameter, only is a solution of the equation.
For the second value of the parameter, solutions are and .