#include <bits/stdc++.h>
using namespace std;
long long max(long long x, long long y) { return x > y ? x : y; }
long long min(long long x, long long y) { return x < y ? x : y; }
void _(long long& a, long long b) {
  a = (a % 1000000007 + b % 1000000007) % 1000000007;
  a = (a + 1000000007) % 1000000007;
}
long long cl(long long a, long long b) { return (a / b) + (!(!(a % b))); }
void solve() {
  long long n;
  cin >> n;
  multiset<long long> s;
  long long d = 1;
  long long g = 2;
  while (d + g < n) {
    s.insert(g);
    d += g;
    g *= 2;
  }
  d = n - d;
  if (d) s.insert(d);
  vector<long long> v;
  cout << s.size() << "\n";
  for (auto i : s) {
    v.push_back(i);
  }
  for (long long i = 0; i < v.size(); ++i) {
    if (i)
      cout << v[i] - v[i - 1] << " ";
    else
      cout << v[i] - 1 << " ";
  }
  cout << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
