#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
int n;
int Cur;
int Sum;
void solve() {
  Cur = 1;
  Sum = n;
  while (true) {
    if (Sum <= Cur) {
      ans.push_back(Sum);
      break;
    }
    if (Sum <= Cur * 2) {
      ans.push_back(Sum / 2);
      ans.push_back(Sum - ans[ans.size() - 1]);
      break;
    } else {
      ans.push_back(Cur);
      Sum -= Cur;
      Cur <<= 1;
    }
  }
  cout << ans.size() - 1 << endl;
  for (int i = 0; i < ans.size() - 1; ++i) cout << ans[i + 1] - ans[i] << " ";
  cout << endl;
}
int main() {
  int cas;
  cin >> cas;
  while (cas--) {
    ans.clear();
    cin >> n;
    solve();
  }
  return 0;
}
