#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b, long long m = 1000000007) {
  a %= m;
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long bpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long modinv(long long a) { return modpow(a, 1000000007 - 2, 1000000007); }
void graph(vector<vector<int> > &adj, int m) {
  int x, y;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    adj[x - 1].push_back(y - 1);
    adj[y - 1].push_back(x - 1);
  }
}
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2> &p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
const int mxN = 2e5 + 5;
void solve() {
  int n;
  cin >> n;
  vector<int> ans;
  ans.push_back(1);
  int sum = 1;
  int i = 1;
  while (sum + (1 << i) <= n) {
    ans.push_back((1 << i));
    sum += (1 << i);
    i++;
  }
  if (sum < n) {
    ans.push_back(n - sum);
  }
  sort(ans.begin(), ans.end());
  cout << (int)ans.size() - 1 << '\n';
  for (int i = 0; i < (int)ans.size() - 1; i++) {
    cout << ans[i + 1] - ans[i] << ' ';
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
