#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
void solve() {
  long long n, i = 0, k;
  cin >> n;
  long long a[1000], m[1000];
  m[0] = 1;
  a[0] = 1;
  while (m[i] < n) {
    a[i + 1] = 2 * a[i];
    m[i + 1] = 2 * a[i + 1] - 1;
    i++;
  }
  k = i;
  if (n >= m[k - 1] + a[k - 1])
    a[k] = n - m[k - 1];
  else {
    if (n == a[k - 1] + 1) {
      for (i = 1; i <= k; i++) a[i] = a[i - 1];
    } else {
      while (1) {
        a[k - 1] = (n - m[k - 2]) / 2;
        m[k - 1] = a[k - 1] + m[k - 2];
        if (n >= a[k - 1] + m[k - 1]) {
          a[k] = n - m[k - 1];
          break;
        }
      }
    }
  }
  cout << k << "\n";
  for (i = 1; i <= k; i++) {
    cout << a[i] - a[i - 1] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, p;
  cin >> t;
  for (p = 1; p <= t; p++) {
    solve();
  }
}
