G. Don't Make It 2
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Ismail hates the number $$$2$$$ due to hard problems related to that number, but his friend Ahmed always gives him numbers containing the number $$$2$$$ to make him angry. But one time, Ismail was very angry. Ahmad thought of a way to calm him down, so he gave him a number $$$N$$$ and asked him to find the largest number $$$X$$$ that satisfies the following conditions:

  • $$$X$$$ must be strictly smaller than $$$N$$$
  • $$$X$$$ must be indivisible by $$$2$$$
  • If you divide $$$X$$$ by 2 repeatedly (until it becomes 1), $$$X$$$ mustn't become divisible by $$$2$$$ after any division step

For example, $$$9$$$ is invalid $$$X$$$ because if we divide it by $$$2$$$ it becomes $$$4$$$ and $$$4$$$ is a multiple of $$$2$$$. $$$3$$$ and $$$1$$$ are examples for valid $$$X$$$

Input

The first line contains the number of test cases $$$T$$$ $$$( 1 \le T \le 2 \cdot 10^{5} )$$$. Each test case contains a single line with one integer $$$N$$$ $$$( 2 \le N \le 10^{18} )$$$ — the number that Ahmad gave to Ismail.

Output

For each test case, output single integer $$$X$$$ that satisfies problem conditions.

Example
Input
2
5
6
Output
3
3