#include <bits/stdc++.h>
using namespace std;
const long double PI = atan(1.0) * 4;
const int64_t INF = 8e18;
const int32_t LOG = 21;
const long long int MOD = 998244353;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int tests = 1;
  cin >> tests;
  for (long long int ii = 0; ii < tests; ii++) {
    long long int n;
    cin >> n;
    n--;
    if (n == 1) {
      cout << 1 << "\n" << 0 << '\n';
      continue;
    }
    long long int cur = 2;
    long long int sum = 0;
    vector<long long int> v;
    while (1) {
      if (sum + cur == n) {
        v.push_back(cur);
        break;
      } else if (sum + cur > n) {
        long long int diff = n - sum;
        long long int siz = v.size();
        long long int last = v[siz - 1];
        if (diff >= last) {
          v.push_back(diff);
          break;
        } else {
          sum -= v[siz - 1];
          diff = (n - sum) / 2;
          v[siz - 1] = diff;
          if ((n - sum) & 1)
            v.push_back(diff + 1);
          else
            v.push_back(diff);
          break;
        }
      } else {
        v.push_back(cur);
        sum += cur;
        cur *= 2;
      }
    }
    long long int siz = v.size();
    cout << siz << '\n';
    cur = 1;
    for (long long int i = 0; i < siz; i++) {
      cout << v[i] - cur << " ";
      cur = v[i];
    }
    cout << '\n';
  }
  return 0;
}
