#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <set>
using namespace std;
typedef long long ll;
int main() {
int t;
cin >> t;
while(t--){
ll n, ans = 1;
cin >> n;
while(n > 3){
n /= 4;
ans *= 2;
}
cout << ans << endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8c2V0Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCmludCBtYWluKCkgewogICAgaW50IHQ7CiAgICBjaW4gPj4gdDsKICAgIHdoaWxlKHQtLSl7CiAgICAgICAgbGwgbiwgYW5zID0gMTsKICAgICAgICBjaW4gPj4gbjsKICAgICAgICB3aGlsZShuID4gMyl7CiAgICAgICAgICAgIG4gLz0gNDsKICAgICAgICAgICAgYW5zICo9IDI7CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgYW5zIDw8IGVuZGw7CiAgICB9Cn0=