#include <bits/stdc++.h>
using namespace std;
void process() {
  int n;
  cin >> n;
  vector<int> ans;
  int mass = 0;
  for (int i = 1; i <= (n - mass); i *= 2) {
    mass += i;
    ans.push_back(i);
  }
  if (n - mass > 0) {
    ans.push_back(n - mass);
    sort(ans.begin(), ans.end());
  }
  cout << (int)ans.size() - 1 << '\n';
  for (int i = 1; i < ans.size(); i++) {
    cout << ans[i] - ans[i - 1] << " ";
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) process();
  return 0;
}
