#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 7;
const long long INF = 1e18 + 5;
const long long maxn = 5e5 + 5;
long long n = 10000000, a[155555], c[555555], mx[555555], p[555555];
long long u[111111], b[100005], sum, cnt, h[555555];
long long bl = 320;
long long bi(long long x, long long y) {
  if (y == 0) return 1ll;
  if (y == 1) return x;
  long long z = bi(x, y / 2);
  z = z * z % n;
  if (y & 1) z = z * x % n;
  return z % n;
}
vector<int> g[155555];
bool ok = 1;
void dfs(int v, int pr = -1) {
  a[v] = p[v];
  long long sum = 0;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to == pr) continue;
    dfs(to, v);
    sum += b[to];
    a[v] += a[to];
  }
  int i = v;
  if ((a[i] + h[i]) % 2 == 1 || (a[i] + h[i]) < 0) ok = 0;
  long long y = (a[i] + h[i]) / 2;
  b[v] = y;
  if (b[v] > a[v] || b[v] < 0) ok = 0;
  if (b[v] < sum) ok = 0;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(NULL);
  int q;
  cin >> q;
  while (q--) {
    long long n;
    cin >> n;
    long long d = 0;
    for (int i = 1; i <= 40; i++) {
      if ((1 << (i + 1)) - 1 < n)
        d = i;
      else
        break;
    }
    d++;
    cout << d << endl;
    n--;
    for (int i = 1; i <= d; i++) a[i] = (1 << (i - 1));
    int c = 1;
    for (int i = 1; i <= d; i++) {
      int x = d - i;
      x++;
      a[i] = min(a[i], n / x - c);
      c += a[i];
      n -= c;
      cout << a[i] << ' ';
    }
    cout << endl;
  }
  return 0;
}
