#include <bits/stdc++.h>
using namespace std;
const int mxN = 1e5;
const long long MOD = 1e9 + 7;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  fast();
  int t;
  cin >> t;
  long long powers[60];
  powers[0] = 1;
  for (int i = 1; i < 60; ++i) {
    powers[i] = powers[i - 1] * 2ll;
  }
  for (int a = 0; a < t; ++a) {
    long long n;
    cin >> n;
    if (n == 2) {
      cout << 1 << "\n" << 0 << "\n";
    } else if (n == 3) {
      cout << 1 << "\n" << 1 << "\n";
    } else {
      --n;
      int stop = 1;
      for (int i = 1; i < 60; ++i) {
        if (n >= powers[i] * 2) {
          n -= powers[i];
        } else {
          stop = i;
          break;
        }
      }
      if (n > powers[stop]) {
        long long stop1 = (n - powers[stop - 1] * 2) / 2;
        long long stop2 = n % 2;
        cout << stop + 1 << "\n";
        for (int i = 0; i < stop - 1; ++i) {
          cout << powers[i] << " ";
        }
        cout << stop1 << " " << stop2 << "\n";
      } else {
        cout << stop << "\n";
        for (int i = 0; i < stop - 1; ++i) {
          cout << powers[i] << " ";
        }
        cout << (n - powers[stop - 1]) << "\n";
      }
    }
  }
}
