#include <bits/stdc++.h>
using namespace std;
long long a[33];
void init() {
  a[0] = 2;
  for (int i = 1; i <= 32; i++) a[i] = a[i - 1] * 2;
  for (int i = 0; i <= 32; i++) a[i] = a[i] - 1;
}
int main(void) {
  int t;
  cin >> t;
  init();
  while (t--) {
    int n;
    cin >> n;
    int d, b[32];
    for (int i = 1; i <= 32; i++) {
      if (n <= a[i]) {
        d = i;
        break;
      }
    }
    b[0] = 1;
    for (int i = 1; i <= d; i++) {
      b[i] = b[i - 1] * 2;
    }
    int c = a[d] - n;
    for (int i = d; i >= 1; i--) {
      int k = b[i] - b[i - 1];
      if (c < k) {
        b[i] -= c;
        c = 0;
      } else {
        b[i] = k;
        c -= k;
      }
      if (c == 0) break;
    }
    cout << d << endl;
    for (int i = 1; i <= d; i++) {
      cout << b[i] - b[i - 1] << ' ';
    }
    cout << endl;
  }
  return 0;
}
