#include <bits/stdc++.h>
using namespace std;
bool isfullmask(long long x) {
  for (int i = 1; i <= 60; ++i)
    if (x == (1ll << i) - 1) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (isfullmask(n)) {
      int bit = 1;
      vector<int> ans;
      while ((n >> bit) & 1)
        ans.push_back((1ll << (bit)) - (1ll << (bit - 1))), bit++;
      cout << ans.size() << '\n';
      for (int i = 0; i < ans.size(); ++i) cout << ans[i] << ' ';
      cout << '\n';
      continue;
    }
    long long sum = 0;
    int bit = 0;
    multiset<int> ans;
    while ((1ll << bit) <= n - sum) {
      sum |= (1ll << bit);
      ans.insert((1ll << bit));
      bit++;
    }
    if (n - sum > 0) ans.insert(n - sum);
    cout << (int)ans.size() - 1 << '\n';
    multiset<int>::iterator tmp = ans.begin();
    multiset<int>::iterator it = ans.begin();
    it++;
    for (; it != ans.end(); it++) cout << *it - *tmp << ' ', tmp = it;
    cout << '\n';
  }
  return 0;
}
