#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int d = 1;
    while (n > pow(2, d + 1) - 1) d++;
    cout << d << endl;
    int curr = 1;
    int last = 1;
    for (int i = 1; i <= d; i++) {
      int inc = pow(2, i);
      int lr = last;
      int rr = inc;
      while (lr < rr - 1) {
        int mr = (lr + rr) / 2;
        if (curr + mr * (d - i + 1) > n)
          rr = mr - 1;
        else
          lr = mr;
      }
      if (curr + rr * (d - i + 1) > n) rr = lr;
      inc = rr;
      curr += inc;
      cout << inc - last << ' ';
      last = inc;
    }
    cout << endl;
  }
}
