#include <bits/stdc++.h>
using namespace std;
vector<int> go(int x, int d) {
  long long mx = 0;
  for (int i = 1; i <= d; i++) mx += 1ll << i;
  if (mx < x) return vector<int>();
  return vector<int>();
}
void solve() {
  int n;
  cin >> n;
  long long x = n - 1;
  long long curr = 1;
  vector<long long> ans;
  while (x > 0) {
    if (curr <= x && x <= 2 * curr) {
      ans.push_back(x - curr);
      break;
    } else if (x <= 4 * curr) {
      ans.push_back(x / 2 - curr);
      ans.push_back(x % 2);
      break;
    }
    ans.push_back(curr);
    curr *= 2;
    x -= curr;
  }
  cout << ((int)ans.size()) << '\n';
  for (long long i : ans) cout << i << " ";
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
