#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int maxn = 2e5 + 43;
const int maxm = 2e3 + 43;
const int maxlog = 22;
const long long mod = (long long)1e9 + 7;
const int sq = 340;
const int inf = 1e9;
const long double PI = 3.141592653589793238463;
vector<long long> ans;
bool fun(long long n) {
  n--;
  long long x = 1;
  while (true) {
    if (n <= 2 * x) {
      ans.push_back(n - x);
      return true;
    }
    if (n >= x + x + 2 * x) {
      ans.push_back(x);
      n -= 2 * x;
      x = 2 * x;
    } else {
      long long y = n - 2 * x;
      y /= 2;
      n -= x + y;
      x = x + y;
      ans.push_back(y);
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.precision(15);
  int t;
  cin >> t;
  while (t--) {
    long long num;
    cin >> num;
    ans.clear();
    long long r = fun(num);
    if (r == false) {
      cout << -1 << endl;
    } else {
      cout << ans.size() << endl;
      for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
      cout << endl;
    }
  }
  return 0;
}
