C++#include <bits/stdc++.h>
#define int long long
using namespace std;
int t;
int n;
int Binary[10000000];
int cnt;
signed main() {
Binary[0]=1;
for(int i=1;(1ll<<i)<=1e18;++i) {
Binary[i]=Binary[i-1]*2;
cnt++;
}
cin >> t;
while (t--) {
priority_queue<int> q;
cin >> n;
int cn=n;
for(int i=cnt;i>=0;--i) {
while(cn>=Binary[i]) {
q.push(Binary[i]);
cn-=Binary[i];
}
}
while((1ll<<((int)__lg(q.size()))!=q.size())) {
int t=q.top();
q.push(t/2);
q.push(t/2);
}
priority_queue<int,vector<int>,greater<int> > p;
while(!q.empty()) {
p.push(q.top());
q.pop();
}
while(!p.empty()) {
cout<<p.top()<<" ";
p.pop();
}
cout<<"\n";
}
return 0;
}