#include #include using namespace std; int main() { int t,n,q; cin>>t; while(t--) { cin>>n; for(int p=0;p<=log(n)+1;p++) { q=1<