You are given an integer and you have to do one operation at a time:
If is odd, you must multiple it by and add to the result.
If is even, you must divide it by .
What is the number with maximum occurrences if you do operations on the given number ?
Input data
The first line of the input will contain , the number of test cases.
Each of the next lines will contain a single number .
Output data
On each line of the output we will print an integer, representing the answer to the problem. If there are multiple solutions, print the biggest one of them.
Constraints and Clarifications
- For tests worth points, .
Example 1
stdin
3
2
18
1
stdout
2
4
1
Explanation
For the first sample test case, the numbers printed will be , , , , , , and therefore and will show up one more time than the other numbers. Since we need to print the biggest integer, then we will print .