#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    vector<int> inc;
    int N;
    cin >> N;
    for (int i = 1; i <= N; i *= 2) {
      inc.push_back(i);
      N -= i;
    }
    if (N > 0) inc.push_back(N);
    sort(inc.begin(), inc.end());
    cout << inc.size() - 1 << "\n";
    for (int i = 0; i < inc.size() - 1; ++i) {
      cout << inc[i + 1] - inc[i] << " ";
    }
    cout << "\n";
  }
  return 0;
}
