About 200+ candidates appeared for the interview of Team ISTE. It became really tough for the President of ISTE to make a choice as to whom to select. Since, only one last candidate was required to complete the team, the President devised a method to select one candidate among a large crowd. Every deserving student's CV is given a number from 1 to N and placed in the same order in a line. Then he starts knocking out the CVs at odd places and rearranges the CVs again and continues the knocking out again. He repeats this process until only one CV is left. This is the last member selected into the ISTE Team. Let us know, who will be selected into the ISTE Team.
INPUT: First line consists of a number 'T', denoting the number of test cases. Next T lines consists of a series of T test cases. Each test case consists of 1 line denoting the number 'N'.
OUTPUT: You have to output in a single line, the number that will be selected into the ISTE Team.