#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int ex = 1;
    long long int req = n - 1;
    vector<long long int> ans;
    while (req > 0) {
      if (ex * 4 <= req) {
        ans.push_back(ex);
        req -= (ex * 2);
        ex *= 2;
      } else {
        long long int ext;
        if (ex * 2 >= req) {
          ext = req - ex;
          ans.push_back(ext);
          req = 0;
        } else {
          ext = req / 2;
          ans.push_back(ext - ex);
          ex = ext;
          req -= ex;
        }
      }
    }
    if (req < 0) {
      cout << -1 << endl;
    } else {
      cout << ans.size() << endl;
      for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
      cout << endl;
    }
  }
}
