#include <bits/stdc++.h>
using namespace std;
int mod = 998244353;
const int M = 1e6 + 10;
const int N = 3e5 + 10;
inline long long read() {
  long long b = 1, sum = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') b = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  return b * sum;
}
long long T, n, m;
int main() {
  int i, j, k;
  T = read();
  while (T--) {
    bool f = 0;
    n = read();
    long long x = 1, sum = 1;
    vector<long long> ans;
    while (1) {
      if (n - sum >= 4 * x) {
        ans.push_back(x);
        x *= 2;
        sum += x;
      } else if (n - sum >= 3 * x) {
        int x1 = n - sum - 2 * x;
        x1 = x1 / 2;
        int x2 = n - sum - 2 * x - 2 * x1;
        ans.push_back(x1);
        ans.push_back(x2);
        break;
      } else if (n - sum > 2 * x) {
        ans.push_back(0);
        ans.push_back(n - sum - 2 * x);
        break;
      } else if (n - sum >= x) {
        ans.push_back(n - sum - x);
        break;
      } else {
        f = 1;
        break;
      }
    }
    if (f) {
      printf("-1\n");
      continue;
    }
    printf("%d\n", ans.size());
    for (i = 0; i < ans.size(); i++) {
      printf("%lld ", ans[i]);
    }
    printf("\n");
  }
  return 0;
}
