#include <bits/stdc++.h>
using namespace std;
const int N = 3e6 + 105;
const int mod = 998244353;
const double Pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
const int G = 3, Gi = 332748118;
long long qpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long T, l, r, n;
long long res[N], cnt;
int main() {
  scanf("%lld", &T);
  while (T--) {
    int flag = 0;
    cnt = 0;
    scanf("%lld", &n);
    long long all = n - 1;
    long long temp = 1;
    while (all) {
      if (temp * 4 <= all) {
        res[++cnt] = temp;
        temp *= 2;
        all -= temp;
      } else if (temp * 2 < all) {
        long long k = all / 2 - temp;
        res[++cnt] = k;
        temp += k;
        all -= temp;
      } else if (temp <= all) {
        res[++cnt] = all - temp;
        all = 0;
      } else {
        flag = 1;
        break;
      }
    }
    if (flag)
      printf("-1\n");
    else {
      printf("%lld\n", cnt);
      for (int i = 1; i <= cnt; ++i) {
        if (i == cnt)
          printf("%lld\n", res[i]);
        else
          printf("%lld ", res[i]);
      }
    }
  }
  return 0;
}
