#include <bits/stdc++.h>
using namespace std;
void boost() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const long long mod = 998244353;
int tablica[2];
long long potega(long long base, long long pot) {
  if (pot == 1) return base;
  if (pot % 2 == 0) {
    long long res = potega(base, pot / 2);
    return ((res * res) % mod);
  } else
    return ((potega(base, pot - 1) * base) % mod);
}
int bs(int pocz, int kon, int szu) {
  int sr;
  while (pocz < kon) {
    sr = (pocz + kon + 1) / 2;
    if (2 * sr <= szu)
      pocz = sr;
    else
      kon = sr - 1;
  }
  return pocz;
}
int n, sum, ile, d, pom, pom1, dodaj;
vector<int> v;
void reset_arrays() {}
void solve() {
  reset_arrays();
  cin >> n;
  v.clear();
  sum = 1;
  ile = 1;
  d = 0;
  while (sum < n) {
    pom = n - sum;
    if (pom <= ile * 2)
      dodaj = pom - ile;
    else {
      pom = bs(ile, ile * 2, pom);
      dodaj = pom - ile;
    }
    v.push_back(dodaj);
    ile += dodaj;
    sum += ile;
    d++;
  }
  cout << d << "\n";
  for (int i = 0; i < d; i++) cout << v[i] << " ";
  cout << "\n";
}
int main() {
  boost();
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
