#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, currVal = 1, currPow = 0;
    cin >> n;
    vector<long long> answer;
    while (currVal < n) {
      answer.push_back((1 << currPow));
      currPow++;
      currVal += (1 << currPow);
    }
    long long diff = currVal - n;
    if (diff <= answer.back()) {
      answer.back() -= diff;
    } else {
      diff -= answer.back();
      answer.back() = 0;
      long long part = (diff + (diff % 2)) / 2;
      answer.back() = diff % 2;
      answer[answer.size() - 2] -= part;
    }
    cout << answer.size() << endl;
    for (int i = 0; i < answer.size(); i++) {
      cout << answer[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
