#include <bits/stdc++.h>
using namespace std;
long long a, b, c, n, t, i, j, sum, v[1000010], k, nr, g, nrb, x;
int main() {
  cin >> t;
  while (t--) {
    v[0] = 0;
    nrb = 1;
    cin >> n;
    sum = 1;
    while (sum < n) {
      x = -1;
      x = max(x, min(nrb, n - sum - nrb));
      if (n - sum - 2 * nrb - 2 * x < 0) x = (n - sum - 2 * nrb) / 2;
      x = max(x, (long long)-1);
      if (n - sum - nrb <= nrb) x = n - sum - nrb;
      if (x != -1) {
        nrb += x;
        v[++v[0]] = x;
      } else
        v[++v[0]] = 0;
      sum += nrb;
    }
    if (sum != n) {
      cout << -1 << '\n';
      continue;
    }
    cout << v[0] << '\n';
    for (i = 1; i <= v[0]; i++) cout << v[i] << " ";
    cout << '\n';
  }
  return 0;
}
