#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long llinf = (1LL << 62);
const int inf = (1 << 30);
const int nmax = 1e5 + 50;
const long long mod = 1e9 + 7;
using namespace std;
int ts, i, cur, pw, l, r, ls, n, mid;
vector<int> vc;
int ok(int x) {
  if (cur + 2 * x <= n) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cerr.tie(0);
  cout.tie(0);
  cin >> ts;
  while (ts--) {
    cin >> n;
    pw = cur = 1, vc.clear();
    while (1) {
      if (cur + 2 * pw >= n) {
        vc.push_back(n - cur - pw);
        break;
      }
      ls = l = pw, r = 2 * pw;
      while (l <= r) {
        mid = (l + r) / 2;
        if (ok(mid))
          pw = mid, l = mid + 1;
        else
          r = mid - 1;
      }
      cur += pw;
      vc.push_back(pw - ls);
    }
    cout << (int)vc.size() << '\n';
    for (i = 0; i < (int)vc.size(); i++) cout << vc[i] << " ";
    cout << '\n';
  }
  return 0;
}
