#include <bits/stdc++.h>
using namespace std;
long long n;
void solve() {
  vector<int> ans;
  long long rem = n, cur = 1;
  while (rem >= cur) {
    ans.push_back(cur);
    rem -= cur;
    cur *= 2;
  }
  if (rem) {
    ans.insert(lower_bound(ans.begin(), ans.end(), rem), rem);
  }
  cout << ans.size() - 1 << '\n';
  for (int i = 1; i < (int)ans.size(); ++i) {
    cout << ans[i] - ans[i - 1] << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    solve();
  }
  return 0;
}
