Some people are standing in a queue. A selection process follows a rule where people standing on even positions are selected. Of the selected people a queue is formed and again out of these only people on even position are selected. This continues until we are left with one person. Find out the position of that person in the original queue.
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N,number of people standing in a queue.
Print the position(original queue) of that person who is left.
1 ≤ T ≤ 1000
1 ≤ N ≤ 100000000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.