#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int ntest;
  cin >> ntest;
  while (ntest--) {
    int n;
    cin >> n;
    list<int> ans;
    int sum = 1;
    n -= 1;
    while (n > 0) {
      if (n <= sum * 2) {
        ans.push_back(n - sum);
        sum += ans.back();
      } else {
        ans.push_back(min((n - sum * 2) / 2, sum));
        sum += ans.back();
      }
      n -= sum;
    }
    cout << ans.size() << '\n';
    for (auto it = ans.begin(); it != ans.end(); ++it) cout << *it << ' ';
    cout << '\n';
  }
  return 0;
}
