#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, i, j, k, ans;
  cin >> t;
  while (t--) {
    cin >> n;
    k = 1;
    j = 0;
    ans = n;
    while (n >= k) {
      n -= k;
      k *= 2;
      j++;
    }
    if (ans == 2)
      cout << "1" << endl << "0" << endl;
    else if (n == 0) {
      cout << j - 1 << endl;
      for (i = 0; i < j - 1; i++) cout << pow(2, i) << " ";
    } else {
      long long int arr[10000], l;
      for (i = 0; i < j - 1; i++) arr[i] = pow(2, i);
      k /= 2;
      n += k;
      if (n >= (2 * k)) {
        arr[i] = k;
        arr[i + 1] = n - k;
      } else {
        arr[i] = n / 2;
        arr[i + 1] = (n / 2) + (n % 2);
      }
      cout << i + 1 << endl;
      for (l = 1; l < (i + 2); l++) cout << arr[l] - arr[l - 1] << " ";
      cout << endl;
    }
  }
}
