#include using namespace std; int lowbit(int n) { return n&(-n); } int main() { int T,n,k; cin>>T; while(T--) { cin>>n; k=lowbit(n)-1; cout<