#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const unsigned long long INF = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> ans;
    for (int i = 1; i <= n; i = i * 2) {
      ans.push_back(i);
      n -= i;
    }
    if (n > 0) {
      ans.push_back(n);
      sort(ans.begin(), ans.end());
    }
    cout << ans.size() - 1 << "\n";
    for (int i = 1; i < ans.size(); i++) cout << ans[i] - ans[i - 1] << " ";
    cout << "\n";
  }
  return 0;
}
